forked from osism/openstack-image-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
38 lines (31 loc) · 1.05 KB
/
Copy pathContainerfile
File metadata and controls
38 lines (31 loc) · 1.05 KB
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
38
ARG PYTHON_VERSION=3.10
FROM python:${PYTHON_VERSION}-alpine
ARG USER_ID=45000
ARG GROUP_ID=45000
COPY . /src
WORKDIR /src
# hadolint ignore=DL3018
RUN apk add --no-cache --virtual .build-deps \
build-base \
git \
libffi-dev \
linux-headers \
openssl-dev \
python3-dev \
&& python3 -m pip --no-cache-dir install . \
&& mkdir -p /etc/openstack-image-manager \
&& cp /src/etc/images/*.yml /etc/openstack-image-manager \
&& rm -rf /src \
&& apk del .build-deps \
&& addgroup -g $GROUP_ID dragon \
&& adduser -D -u $USER_ID -G dragon dragon \
&& mkdir -p /input \
&& chown -R dragon: /input
USER dragon
WORKDIR /input
VOLUME ["/input"]
LABEL "org.opencontainers.image.documentation"="https://docs.osism.tech/openstack-image-manager/" \
"org.opencontainers.image.licenses"="ASL 2.0" \
"org.opencontainers.image.source"="https://github.com/osism/openstack-image-manager" \
"org.opencontainers.image.url"="https://www.osism.tech" \
"org.opencontainers.image.vendor"="OSISM GmbH"