-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathDockerfile
35 lines (27 loc) · 842 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
34
35
FROM fedora:37
RUN dnf -y update && dnf clean all
# Python 3.11
RUN dnf -y install \
zsh \
sudo \
python3 \
python3-pip \
&& dnf clean all
ARG user=test
ARG repository=markosamuli.linuxbrew
# Create test user
RUN useradd -m -s /bin/bash ${user} \
&& echo "${user}:${user}" | chpasswd \
&& usermod -aG wheel ${user} \
&& echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN touch /home/${user}/.zshrc \
&& chown -R ${user}:${user} /home/${user}
# Create directory for code
RUN mkdir -p /home/${user}/${repository} ; \
chown -R ${user}:${user} /home/${user}/${repository}
VOLUME ["/home/${user}/${repository}"]
USER ${user}
ARG ansible_version=">=2.9.22"
ENV ANSIBLE_VERSION="${ansible_version}"
RUN python3 -m pip install ansible${ANSIBLE_VERSION}
CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"