17 lines
713 B
Groff
17 lines
713 B
Groff
FROM alpine:3.7 as builder
|
|
RUN apk add -U
|
|
RUN mkdir -p /var/cache/apk && ln -s /var/cache/apk /etc/apk/cache && apk add \
|
|
--update py2-pip gcc musl-dev python-dev libffi-dev openssl-dev make
|
|
RUN pip install wheel && pip wheel --wheel-dir=/root/wheel ansible==2.4 docker-py
|
|
|
|
FROM alpine:3.7 as production
|
|
COPY --from=builder /root/wheel /root/wheel
|
|
COPY --from=builder /root/.cache /root/.cache
|
|
COPY --from=builder /etc/apk/cache /etc/apk/cache
|
|
RUN apk add python py2-pip docker
|
|
RUN pip install --no-index --find-links=/root/wheel ansible docker-py
|
|
RUN rm -rf /root/.cache /etc/apk/cache/* /root/wheel/
|
|
|
|
WORKDIR /ansible
|
|
CMD ["echo", "Execute some ansible command. Remember to mount all in the /ansible dir."]
|