mirror of https://github.com/docker/docker-py.git
Merge pull request #2383 from thaJeztah/support_mirrors
test/Dockerfile: allow using a mirror for the apt repository
This commit is contained in:
commit
5660730d36
4
Makefile
4
Makefile
|
@ -8,11 +8,11 @@ clean:
|
|||
|
||||
.PHONY: build
|
||||
build:
|
||||
docker build -t docker-sdk-python -f tests/Dockerfile --build-arg PYTHON_VERSION=2.7 .
|
||||
docker build -t docker-sdk-python -f tests/Dockerfile --build-arg PYTHON_VERSION=2.7 --build-arg APT_MIRROR .
|
||||
|
||||
.PHONY: build-py3
|
||||
build-py3:
|
||||
docker build -t docker-sdk-python3 -f tests/Dockerfile .
|
||||
docker build -t docker-sdk-python3 -f tests/Dockerfile --build-arg APT_MIRROR .
|
||||
|
||||
.PHONY: build-docs
|
||||
build-docs:
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
ARG PYTHON_VERSION=3.7
|
||||
|
||||
FROM python:${PYTHON_VERSION}
|
||||
|
||||
ARG APT_MIRROR
|
||||
RUN sed -ri "s/(httpredir|deb).debian.org/${APT_MIRROR:-deb.debian.org}/g" /etc/apt/sources.list \
|
||||
&& sed -ri "s/(security).debian.org/${APT_MIRROR:-security.debian.org}/g" /etc/apt/sources.list
|
||||
|
||||
RUN apt-get update && apt-get -y install \
|
||||
gnupg2 \
|
||||
pass \
|
||||
|
|
Loading…
Reference in New Issue