File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,17 @@ RUN apt update && apt install -y locales build-essential git curl sudo make jq u
1010 libxmlsec1-dev libffi-dev liblzma-dev apt-transport-https ca-certificates software-properties-common \
1111 cmake ninja-build libgtk-3-dev
1212
13+ # add docker official gpg key
14+ RUN install -m 0755 -d /etc/apt/keyrings
15+ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
16+ RUN chmod a+r /etc/apt/keyrings/docker.asc
17+
18+ # add the repository to apt sources:
19+ RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo " ${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
20+
21+ # install docker
22+ RUN apt update && apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
23+
1324# gilab-runner package
1425RUN curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" | bash
1526RUN apt install -y gitlab-runner
@@ -31,6 +42,10 @@ RUN echo "runner ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
3142WORKDIR /home/runner
3243USER runner
3344
45+ # set group
46+ RUN sudo usermod -aG docker runner
47+ RUN newgrp docker
48+
3449# set initial git config
3550RUN git config --global --add safe.directory /home/gitlab-runner/builds*
3651
You can’t perform that action at this time.
0 commit comments