-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile
64 lines (50 loc) · 1.74 KB
/
dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM gitlab/gitlab-runner:alpine-v14.3.2
ENV TZ Asia/Yekaterinburg
RUN apk --update --no-cache add tzdata && cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apk --update --no-cache add \
sudo \
bash \
zip \
samba-client \
make \
unzip \
curl \
ca-certificates \
docker-cli \
nodejs \
nodejs-npm \
docker-compose
# remove default 1.25 version, need 1.27 with `extend` directive support
# 19.10.2021 build from source not needed else, 1.27 from the box
# docker-compose
# RUN apk --update --no-cache add \
# python3-dev \
# py-pip \
# libffi-dev \
# openssl-dev \
# gcc \
# libc-dev \
# rust \
# cargo
# RUN pip3 install docker-compose
RUN npm install -g npm@latest
COPY ./cert/gitlab.crt /etc/gitlab-runner/certs/ca.crt
COPY ./cert/gitlab.crt /usr/local/share/ca-certificates/gitlab.crt
COPY ./cert/gitlab.registry.crt /usr/local/share/ca-certificates/registry.gitlab.crt
RUN update-ca-certificates
COPY --chown=gitlab-runner:nogroup ./key/id_rsa /usr/local/ssh/tunnel.id_rsa
COPY --chown=gitlab-runner:nogroup ./key/id_rsa.pub /usr/local/ssh/tunnel.id_rsa.pub
RUN chmod 400 /usr/local/ssh/tunnel.id_rsa
RUN chmod 400 /usr/local/ssh/tunnel.id_rsa.pub
COPY --chown=gitlab-runner:nogroup ./register.sh /usr/local/bin/register
COPY --chown=gitlab-runner:nogroup ./run.sh /usr/local/bin/gitlab-runner-run
COPY --chown=gitlab-runner:nogroup ./config.toml /home/gitlab-runner/config.toml
COPY --chown=gitlab-runner:nogroup ./ci.sh /usr/local/bin/ci
COPY --chown=gitlab-runner:nogroup ./tools /usr/local/bin/tools
RUN addgroup gitlab-runner users
RUN addgroup -g 998 docker
RUN addgroup gitlab-runner docker
WORKDIR /home/gitlab-runner
ENTRYPOINT [ "/bin/bash" ]
# bash script
CMD [ "gitlab-runner-run" ]