-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (27 loc) · 1.01 KB
/
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
FROM registry.access.redhat.com/ubi8/python-39:latest
ARG ANSIBLE_VERSION
ENV ANSIBLE_VERSION=${ANSIBLE_VERSION}
ENV HOME=/home/default
WORKDIR /home/default
USER 0
ADD requirements_${ANSIBLE_VERSION}.txt /
ADD bw /usr/local/bin
RUN \
dnf -y install jq unzip nmap-ncat && \
dnf clean all -y && \
mkdir -m 0775 /data && \
chown -R 1001:0 /data && \
usermod -d /home/default default && \
chmod 0770 /home/default && \
chown -R 1001:0 /home/default && \
curl -Lo /tmp/bw-linux.zip $(curl -s https://api.github.com/repos/bitwarden/clients/releases | jq -r 'first(.[] | select(.tag_name|test("cli-."))) | .assets[] | select(.name|test("bw-linux.*zip")) | .browser_download_url') && \
unzip /tmp/bw-linux.zip -d /tmp && \
mv /tmp/bw /usr/local/bin/bwcli && \
chmod +x /usr/local/bin/bwcli /usr/local/bin/bw
USER 1001
# Install the dependencies
RUN pip install -U "pip>=23.0.1" && \
pip install -r "/requirements_${ANSIBLE_VERSION}.txt"
ADD --chmod=0755 run.sh /
ENV ANSIBLE_VERSION=
ENTRYPOINT ["/run.sh"]