mirror of https://github.com/docker/compose.git
Improve Dockerfile.run
This dockerfile generates a more lightweight image that works with the current official dynamically generated binaries Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com> Change image script to use new Dockerfile.run image without building compose Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com> Apply suggested fixes Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
This commit is contained in:
parent
31b2d9176b
commit
44653f2812
|
@ -1,14 +1,14 @@
|
|||
|
||||
FROM alpine:3.4
|
||||
ARG version
|
||||
RUN apk -U add \
|
||||
python \
|
||||
py-pip
|
||||
|
||||
COPY requirements.txt /code/requirements.txt
|
||||
RUN pip install -r /code/requirements.txt
|
||||
ENV GLIBC 2.23-r3
|
||||
|
||||
COPY dist/docker_compose-${version}-py2.py3-none-any.whl /code/
|
||||
RUN pip install --no-deps /code/docker_compose-${version}-py2.py3-none-any.whl
|
||||
RUN apk update && apk add --no-cache openssl ca-certificates && \
|
||||
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub && \
|
||||
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC/glibc-$GLIBC.apk && \
|
||||
apk add --no-cache glibc-$GLIBC.apk && rm glibc-$GLIBC.apk && \
|
||||
ln -s /lib/libz.so.1 /usr/glibc-compat/lib/ && \
|
||||
ln -s /lib/libc.musl-x86_64.so.1 /usr/glibc-compat/lib
|
||||
|
||||
ENTRYPOINT ["/usr/bin/docker-compose"]
|
||||
COPY dist/docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
|
||||
|
||||
ENTRYPOINT ["docker-compose"]
|
||||
|
|
|
@ -8,8 +8,10 @@ if [ -z "$1" ]; then
|
|||
fi
|
||||
|
||||
TAG=$1
|
||||
|
||||
VERSION="$(python setup.py --version)"
|
||||
|
||||
./script/build/write-git-sha
|
||||
python setup.py sdist bdist_wheel
|
||||
docker build --build-arg version=$VERSION -t docker/compose:$TAG -f Dockerfile.run .
|
||||
./script/build/linux
|
||||
docker build -t docker/compose:$TAG -f Dockerfile.run .
|
||||
|
|
Loading…
Reference in New Issue