-
Notifications
You must be signed in to change notification settings - Fork 22
/
Dockerfile
50 lines (41 loc) · 1.34 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
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM python:3.9.17-alpine3.18 AS builder
ARG BUILD_DEPS="\
docker \
gcc \
libc-dev \
libffi-dev \
make \
musl-dev \
openssh-client \
openssl-dev \
"
RUN apk add --update --no-cache ${BUILD_DEPS}
COPY Pipfile* .
RUN pip install pipenv && \
pipenv install --deploy --system
FROM python:3.9.17-alpine3.18 AS runtime
LABEL "maintainer"="Eugene Vasilenko <gmrnsk@gmail.com>"
LABEL "repository"="https://github.com/gofrolist/molecule-action"
LABEL "com.github.actions.name"="molecule"
LABEL "com.github.actions.description"="Run Ansible Molecule"
LABEL "com.github.actions.icon"="upload"
LABEL "com.github.actions.color"="green"
COPY --from=builder /usr/local/lib/python3.9/site-packages/ /usr/local/lib/python3.9/site-packages/
COPY --from=builder /usr/local/bin/ansible* \
/usr/local/bin/cookiecutter \
/usr/local/bin/molecule \
/usr/local/bin/pre-commit* \
/usr/local/bin/yamllint \
/usr/local/bin/
ARG PACKAGES="\
docker \
git \
openssh-client \
podman \
rsync \
tini \
"
RUN apk add --update --no-cache ${PACKAGES} && \
rm -rf /root/.cache
ENTRYPOINT ["/sbin/tini", "--"]
CMD cd ${INPUT_MOLECULE_WORKING_DIR}; molecule ${INPUT_MOLECULE_OPTIONS} ${INPUT_MOLECULE_COMMAND} ${INPUT_MOLECULE_ARGS}