-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
base-service-Dockerfile
40 lines (33 loc) · 1.08 KB
/
base-service-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
# Base docker image for most services we run in production on GCP
FROM ubuntu:22.04@sha256:bace9fb0d5923a675c894d5c815da75ffe35e24970166a48a4460a48ae6e0d19 as dark-base
# Our deploy runs this on CircleCI, and the default URLs can sometimes be slow to
# download from. This switches to the closest mirror to CircleCI (recommended by
# CircleCI support).
RUN sh -c "sed -i 's|http://archive|http://us-east-1.ec2.archive|g' /etc/apt/sources.list"
RUN apt-get update && \
apt-get install \
-y \
--no-install-recommends \
curl \
apt-transport-https \
ca-certificates \
netbase \
libcurl4-openssl-dev \
locales \
sudo \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Locales
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
# Dark user
RUN adduser --disabled-password --gecos '' dark
RUN echo "dark:dark" | chpasswd && adduser dark sudo
RUN chown -R dark:dark /home/dark
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Set up app
USER dark
WORKDIR /home/dark
ARG GIT_COMMIT
ENV GIT_COMMIT ${GIT_COMMIT}