Skip to content

Commit 1fa78ca

Browse files
committed
Add docker container proxy for cache packages of yum, apt and pip repos.
1 parent d21c149 commit 1fa78ca

13 files changed

+104
-37
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ env:
4646
DOCKER_PRIVILEGED=true
4747
- >
4848
DISTRIBUTION=ubuntu-upstart
49-
DIST_VERSION=14.04
49+
DIST_VERSION=14_04-builded
5050
MONGODB_VERSION=4.0
5151
DOCKER_PRIVILEGED=true
5252
- >
5353
DISTRIBUTION=ubuntu-upstart
54-
DIST_VERSION=14.04
54+
DIST_VERSION=14_04-builded
5555
MONGODB_VERSION=3.6
5656
DOCKER_PRIVILEGED=true
5757
- >
5858
DISTRIBUTION=ubuntu-upstart
59-
DIST_VERSION=14.04
59+
DIST_VERSION=14_04-builded
6060
MONGODB_VERSION=3.4
6161
DOCKER_PRIVILEGED=true
6262
- >

tests/Dockerfile.amazonlinux_2-builded

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM amazonlinux:2
33
# This is needed so that ansible managed to read "ansible_default_ipv4"
44
# This step is needed since standard CentOS docker image does not come with i
55
# This package seems to be required for Mongo 3.2 and downwards
6-
RUN yum install iproute initscripts -y
6+
RUN yum install iproute initscripts python-pip python-devel -y
77

88
# we can has SSH
99
EXPOSE 22

tests/Dockerfile.centos_6-builded

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM centos:6
22

33
# This is needed so that ansible managed to read "ansible_default_ipv4"
44
# This step is needed since standard CentOS docker image does not come with EPEL installed by default
5-
RUN yum install iproute epel-release -y
5+
RUN yum install iproute epel-release python-pip python-devel -y
66

77
# we can has SSH
88
EXPOSE 22

tests/Dockerfile.centos_7-builded

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM centos:7
22

33
# This is needed so that ansible managed to read "ansible_default_ipv4"
44
# This step is needed since standard CentOS docker image does not come with EPEL installed by default
5-
RUN yum install iproute epel-release -y
5+
RUN yum install iproute epel-release python-pip python-devel -y
66

77
# we can has SSH
88
EXPOSE 22

tests/Dockerfile.debian_8-builded

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ FROM debian:8
33
ARG DEBIAN_FRONTEND=noninteractive
44

55
RUN apt update && \
6-
apt install --yes python-minimal && \
6+
apt install --yes python-minimal python-pip && \
77
rm /lib/systemd/system/[email protected]

tests/Dockerfile.debian_9-builded

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM debian:9
33
ARG DEBIAN_FRONTEND=noninteractive
44

55
RUN apt update && \
6-
apt install --yes python-minimal systemd gnupg
6+
apt install --yes python-minimal systemd gnupg python-pip
77

88
RUN cd /lib/systemd/system/sysinit.target.wants/ && \
99
ls | grep -v systemd-tmpfiles-setup.service | xargs rm -f && \
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM ubuntu-upstart
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
5+
RUN apt-get update && \
6+
apt-get install --yes python-minimal python-pip python-dev iproute2
7+

tests/Dockerfile.ubuntu_16_04-builded

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,6 @@ FROM ubuntu:16.04
33
ARG DEBIAN_FRONTEND=noninteractive
44

55
RUN apt update && \
6-
apt install --yes python-pip curl jq && \
7-
pip install apt-select && \
8-
EXTERNAL_IP=`curl -s https://ipinfo.io/ip` && \
9-
echo "EXTERNAL_IP is ${EXTERNAL_IP}" && \
10-
DATA_IP=`curl -s https://json.geoiplookup.io/$EXTERNAL_IP` && \
11-
echo $DATA_IP && \
12-
COUNTRY_IP=`echo $DATA_IP | jq '.country_code' | tr -d '"'` && \
13-
apt-select -C $COUNTRY_IP -t 1 -m one-week-behind && \
14-
cat sources.list && \
15-
cp /etc/apt/sources.list /etc/apt/sources.list.backup && \
16-
mv -f sources.list /etc/apt/
17-
18-
RUN apt update && \
19-
apt install --yes python-minimal iproute2 && \
20-
rm -f /lib/systemd/system/[email protected]
6+
apt install --yes python-minimal python-pip python-dev iproute2 && \
7+
rm /lib/systemd/system/[email protected]
218

tests/Dockerfile.ubuntu_18_04-builded

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,7 @@ FROM ubuntu:18.04
33
ARG DEBIAN_FRONTEND=noninteractive
44

55
RUN apt update && \
6-
apt install --yes python-pip curl jq && \
7-
pip install apt-select && \
8-
EXTERNAL_IP=`curl -s https://ipinfo.io/ip` && \
9-
echo "EXTERNAL_IP is ${EXTERNAL_IP}" && \
10-
DATA_IP=`curl -s https://json.geoiplookup.io/$EXTERNAL_IP` && \
11-
echo $DATA_IP && \
12-
COUNTRY_IP=`echo $DATA_IP | jq '.country_code' | tr -d '"'` && \
13-
apt-select -C $COUNTRY_IP -t 1 -m one-week-behind && \
14-
cat sources.list && \
15-
cp /etc/apt/sources.list /etc/apt/sources.list.backup && \
16-
mv -f sources.list /etc/apt/
17-
18-
RUN apt update && \
19-
apt install --yes python-minimal systemd gnupg iproute2
6+
apt install --yes python-minimal python-pip python-dev systemd gnupg iproute2
207

218
RUN cd /lib/systemd/system/sysinit.target.wants/ && \
229
ls | grep -v systemd-tmpfiles-setup.service | xargs rm -f && \
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Acquire::http::Proxy "http://proxy:3128/";
2+
Acquire::https::Proxy "http://proxy:3128/";
3+

0 commit comments

Comments
 (0)