-
Notifications
You must be signed in to change notification settings - Fork 667
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add linode extra * Drop manual apk update and cleanup * Put Molecule extras into env var * Retrieve a Docker tag as pbr does
- Loading branch information
Showing
5 changed files
with
92 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# This is a multi-stage build which requires Docker 17.05 or higher | ||
FROM python:3.7-alpine as molecule-builder | ||
|
||
WORKDIR /usr/src/molecule | ||
|
||
ENV PACKAGES="\ | ||
gcc \ | ||
git \ | ||
libffi-dev \ | ||
make \ | ||
musl-dev \ | ||
openssl-dev \ | ||
" | ||
RUN apk add --update --no-cache ${PACKAGES} | ||
|
||
ENV MOLECULE_EXTRAS="azure,docker,docs,ec2,gce,linode,lxc,openstack,vagrant,windows" | ||
|
||
ADD . . | ||
RUN \ | ||
pip wheel \ | ||
-w dist \ | ||
".[${MOLECULE_EXTRAS}]" | ||
|
||
# ✄--------------------------------------------------------------------- | ||
# This is an actual target container: | ||
|
||
FROM python:3.7-alpine | ||
LABEL maintainer "Ansible <[email protected]>" | ||
|
||
ENV PACKAGES="\ | ||
docker \ | ||
ruby \ | ||
" | ||
ENV BUILD_DEPS="\ | ||
gcc \ | ||
libc-dev \ | ||
make \ | ||
ruby-dev \ | ||
ruby-rdoc \ | ||
" | ||
|
||
ENV PIP_INSTALL_ARGS="\ | ||
--only-binary :all: \ | ||
--no-index \ | ||
-f /usr/src/molecule/dist \ | ||
" | ||
|
||
ENV GEM_PACKAGES="\ | ||
rubocop \ | ||
" | ||
|
||
ENV MOLECULE_EXTRAS="azure,docker,docs,ec2,gce,linode,lxc,openstack,vagrant,windows" | ||
|
||
COPY --from=molecule-builder \ | ||
/usr/src/molecule/dist \ | ||
/usr/src/molecule/dist | ||
|
||
RUN \ | ||
apk add --update --no-cache ${BUILD_DEPS} ${PACKAGES} && \ | ||
pip install ${PIP_INSTALL_ARGS} "molecule[${MOLECULE_EXTRAS}]" && \ | ||
gem install ${GEM_PACKAGES} && \ | ||
apk del --no-cache ${BUILD_DEPS} && \ | ||
rm -rf /root/.cache | ||
|
||
ENV SHELL /bin/bash |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters