2016-10-21 07:18:31 +03:00
|
|
|
# Dockerfile for Azure/batch-shipyard (Cascade)
|
2016-08-27 01:03:56 +03:00
|
|
|
|
|
|
|
FROM gliderlabs/alpine:3.4
|
2016-09-08 21:03:40 +03:00
|
|
|
MAINTAINER Fred Park <https://github.com/Azure/batch-shipyard>
|
2016-08-27 01:03:56 +03:00
|
|
|
|
|
|
|
# set environment variables
|
2016-08-27 08:56:00 +03:00
|
|
|
# currently libtorrent-rasterbar 1.1.0+ DHT implementations are broken
|
2016-09-15 22:47:43 +03:00
|
|
|
ENV libtorrent_version=1.0.10 \
|
2016-08-31 20:44:38 +03:00
|
|
|
CFLAGS=-lstdc++ PYTHON=/usr/bin/python3 PYTHON_VERSION=3.5
|
2016-08-27 01:03:56 +03:00
|
|
|
|
|
|
|
# add base packages, python dependencies, create script directory,
|
|
|
|
# build libtorrent-rasterbar for python3 and cleanup packaging
|
|
|
|
RUN apk update \
|
|
|
|
&& apk add --update --no-cache \
|
2016-09-08 07:16:27 +03:00
|
|
|
musl build-base python3 python3-dev openssl-dev libffi-dev \
|
|
|
|
ca-certificates boost boost-dev boost-python3 file curl tar pigz \
|
|
|
|
docker bash \
|
2016-09-15 22:47:43 +03:00
|
|
|
&& pip3 install --no-cache-dir --upgrade pip azure-storage==0.33.0 \
|
2016-08-31 20:44:38 +03:00
|
|
|
&& curl -SL https://github.com/arvidn/libtorrent/releases/download/libtorrent-${libtorrent_version//./_}/libtorrent-rasterbar-${libtorrent_version}.tar.gz -o libtorrent-${libtorrent_version}.tar.gz \
|
2016-08-27 01:03:56 +03:00
|
|
|
&& tar zxvpf libtorrent-${libtorrent_version}.tar.gz \
|
|
|
|
&& cd libtorrent-rasterbar-${libtorrent_version} \
|
|
|
|
&& ./configure --prefix=/usr --enable-debug=no --enable-python-binding --with-boost-system=boost_system \
|
2016-10-26 01:02:28 +03:00
|
|
|
&& make -j4 install \
|
2016-08-27 01:03:56 +03:00
|
|
|
&& ldconfig /usr/lib \
|
|
|
|
&& cd .. \
|
|
|
|
&& rm -rf libtorrent-rasterbar-${libtorrent_version} \
|
2016-10-28 21:03:40 +03:00
|
|
|
&& rm -f libtorrent-${libtorrent_version}.tar.gz \
|
2016-08-27 01:03:56 +03:00
|
|
|
&& apk del --purge \
|
2016-09-08 07:16:27 +03:00
|
|
|
build-base python3-dev openssl-dev libffi-dev python boost-dev \
|
|
|
|
file curl \
|
2016-08-27 01:03:56 +03:00
|
|
|
&& apk add --no-cache boost-random \
|
|
|
|
&& rm /var/cache/apk/* \
|
|
|
|
&& mkdir -p /opt/batch-shipyard
|
|
|
|
|
|
|
|
# copy in files
|
2016-10-21 07:18:31 +03:00
|
|
|
COPY cascade.py setup_private_registry.py perf.py docker_cascade.sh /opt/batch-shipyard/
|
2016-08-27 01:03:56 +03:00
|
|
|
|
2017-03-03 21:25:13 +03:00
|
|
|
# pre-compile files
|
|
|
|
RUN python3 -m compileall -f /opt/batch-shipyard
|
|
|
|
|
2016-08-27 01:03:56 +03:00
|
|
|
# set command
|
|
|
|
CMD ["/opt/batch-shipyard/docker_cascade.sh"]
|
|
|
|
|