bitwarden-crd-operator/Dockerfile

36 lines
1.4 KiB
Docker
Raw Normal View History

2024-01-06 22:37:22 +00:00
FROM alpine:3.19.0
2022-09-04 21:21:33 +00:00
2023-04-22 13:15:53 +00:00
LABEL org.opencontainers.image.source=https://github.com/Lerentis/bitwarden-crd-operator
LABEL org.opencontainers.image.description="Kubernetes Operator to create k8s secrets from bitwarden"
LABEL org.opencontainers.image.licenses=MIT
ARG PYTHON_VERSION=3.11.8-r0
2024-01-06 22:37:22 +00:00
ARG PIP_VERSION=23.3.1-r0
ARG GCOMPAT_VERSION=1.1.0-r4
ARG LIBCRYPTO_VERSION=3.1.4-r2
2024-01-07 20:20:56 +00:00
ARG BW_VERSION=2023.7.0
ARG NODE_VERSION=20.11.1-r0
2022-12-18 11:09:26 +00:00
2023-05-11 08:22:15 +00:00
COPY requirements.txt /requirements.txt
2022-09-04 21:21:33 +00:00
RUN set -eux; \
apk update; \
apk del nodejs-current; \
apk add nodejs=${NODE_VERSION} npm; \
npm install -g @bitwarden/cli@${BW_VERSION}; \
2022-11-19 23:57:01 +00:00
addgroup -S -g 1000 bw-operator; \
adduser -S -D -u 1000 -G bw-operator bw-operator; \
2022-09-04 21:21:33 +00:00
mkdir -p /home/bw-operator; \
chown -R bw-operator /home/bw-operator; \
2023-05-31 08:17:59 +00:00
apk add gcc musl-dev libstdc++ gcompat=${GCOMPAT_VERSION} python3=${PYTHON_VERSION} py3-pip=${PIP_VERSION} libcrypto3=${LIBCRYPTO_VERSION}; \
2024-01-06 22:37:22 +00:00
pip install -r /requirements.txt --no-warn-script-location --break-system-packages; \
2023-05-11 08:22:15 +00:00
rm /requirements.txt; \
2022-11-19 23:57:01 +00:00
apk del --purge gcc musl-dev libstdc++;
2022-09-04 21:21:33 +00:00
2022-11-12 22:57:42 +00:00
COPY --chown=bw-operator:bw-operator src /home/bw-operator
2022-09-04 21:21:33 +00:00
USER bw-operator
2022-12-26 15:29:14 +00:00
ENTRYPOINT [ "kopf", "run", "--log-format=json", "--all-namespaces", "--liveness=http://0.0.0.0:8080/healthz" ]
2022-11-26 17:55:42 +00:00
CMD [ "/home/bw-operator/bitwardenCrdOperator.py", "/home/bw-operator/kv.py", "/home/bw-operator/dockerlogin.py", "/home/bw-operator/template.py"]