-
Notifications
You must be signed in to change notification settings - Fork 22
/
Dockerfile
42 lines (33 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
38
39
40
41
42
FROM python:3.7-alpine
LABEL "maintainer"="Eugene Vasilenko <gmrnsk@gmail.com>"
LABEL "repository"="https://github.com/gofrolist/molecule-action"
LABEL "homepage"="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"
ARG BUILD_DEPS="\
gcc \
libc-dev \
make \
musl-dev \
libffi-dev \
openssl-dev \
"
ARG PACKAGES="\
docker \
git \
openssh-client \
"
ARG PIP_INSTALL_ARGS="\
--no-cache-dir \
"
# ARG PIP_MODULES="\
# netaddr \
# "
ARG MOLECULE_EXTRAS="docker"
RUN apk add --update --no-cache ${BUILD_DEPS} ${PACKAGES} && \
pip install ${PIP_INSTALL_ARGS} ${PIP_MODULES} "molecule[${MOLECULE_EXTRAS}]" && \
apk del --no-cache ${BUILD_DEPS} && \
rm -rf /root/.cache
CMD cd ${GITHUB_REPOSITORY}; molecule ${INPUT_MOLECULE_OPTIONS} ${INPUT_MOLECULE_COMMAND} ${INPUT_MOLECULE_ARGS}