-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (28 loc) · 899 Bytes
/
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
# The base image
FROM alpine:3.14
# Non-root user
ARG USER
ARG PASS
# Install applications
RUN apk update && \
apk upgrade --available && \
apk add --no-cache \
openssl \
ca-certificates \
sudo \
curl \
docker \
docker-compose
# Setup non-root user
COPY ./conf/profile /home/${USER}/.profile
RUN /bin/ash -c 'adduser -h /home/${USER} -s /bin/ash -g ${USER} ${USER}; echo "${USER}:${PASS}" | chpasswd; \
addgroup ${USER} wheel; \
addgroup ${USER} docker; \
chown ${USER}:${USER} /home/${USER}/.profile; \
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers'
# Add Zscaler CAs
COPY ./ca/* /usr/local/share/ca-certificates/
RUN update-ca-certificates --fresh
# Add wsl config file
COPY ./conf/wsl.conf /etc/wsl.conf
RUN /bin/ash -c 'echo "default = ${USER}" >> /etc/wsl.conf'