-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile-base
53 lines (42 loc) · 1.33 KB
/
Dockerfile-base
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
FROM ubuntu:focal-20210723
ENV DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update \
&& apt-get install -y --no-install-recommends locales \
&& locale-gen en_US.UTF-8 \
&& dpkg-reconfigure locales
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
RUN apt-get install -y --no-install-recommends \
software-properties-common \
&& add-apt-repository ppa:git-core/ppa \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
tar \
apt-transport-https \
ca-certificates \
sudo \
openssh-client \
python3 \
dumb-init \
git-core \
&& c_rehash \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/*
RUN mkdir -p /opt/hostedtoolcache
RUN groupadd ubuntu
RUN useradd -rm -d /home/ubuntu -s /bin/bash -g ubuntu -G sudo -u 1001 ubuntu
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER ubuntu
RUN mkdir /home/ubuntu/runner
RUN mkdir /home/ubuntu/_work
WORKDIR /home/ubuntu/runner
COPY --chown=ubuntu:ubuntu bootstrap entrypoint /home/ubuntu/runner/
RUN sudo chmod +x /home/ubuntu/runner/bootstrap \
&& sudo chmod +x /home/ubuntu/runner/entrypoint \
&& /home/ubuntu/runner/bootstrap \
&& rm /home/ubuntu/runner/bootstrap
ENTRYPOINT ["/home/ubuntu/runner/entrypoint"]
CMD ["/home/ubuntu/runner/bin/runsvc.sh"]