Skip to content
Snippets Groups Projects
Commit 5b948b29 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Don't run CI jobs as root

parent 7ba8e977
No related branches found
No related tags found
No related merge requests found
image: debian:buster
image: registry.gitlab.tugraz.at/vpu/webcomponents/common/main:v2
before_script:
- apt update
- apt install -y git
- "sed -i 's|git@gitlab.tugraz.at:VPU|../..|g' .gitmodules"
- git submodule sync
- git submodule update --init
......@@ -13,7 +11,5 @@ stages:
test:
stage: test
script:
- apt update
- apt install -y npm chromium
- npm install
- npm test
......@@ -5,13 +5,21 @@ ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
git \
curl
curl \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y \
nodejs \
chromium-browser \
firefox \
composer \
rsync
\ No newline at end of file
rsync \
sudo \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -u 1000 -ms /bin/bash user
RUN echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER user
#!/bin/bash
set -e
TAG="registry.gitlab.tugraz.at/vpu/webcomponents/common/main:v1"
TAG="registry.gitlab.tugraz.at/vpu/webcomponents/common/main:v2"
sudo docker build --tag "${TAG}" --file "Dockerfile" .
echo "Now run: sudo docker push '$TAG'"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment