-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (22 loc) · 932 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
FROM python:3.9-slim-buster
COPY . /usr/src/tfworker
WORKDIR /usr/src/tfworker
# apt is run with 2>/dev/null to squelch apt CLI warnings and make builds look cleaner, remove to debug
RUN apt update 2>/dev/null && \
apt install -y --no-install-recommends \
wget git unzip && 2>/dev/null \
wget --quiet --output-document terraform.zip https://releases.hashicorp.com/terraform/0.15.5/terraform_0.15.5_linux_amd64.zip && \
unzip terraform.zip && \
rm terraform.zip && \
mv terraform /usr/local/bin && \
chmod 755 /usr/local/bin/terraform && \
pip install . && \
apt remove -y wget unzip 2>/dev/null && \
rm -rf /var/lib/apt/lists/*
ENV USER=orwork
RUN addgroup --gid 1000 ${USER} && \
adduser --uid 1000 --gecos "${USER} user" --gid 1000 --disabled-password ${USER} && \
chown -R ${USER}:${USER} /home/orwork
USER ${USER}:${USER}
WORKDIR /home/orwork
ENTRYPOINT [ "/bin/bash" ]