Skip to content

Commit f8981d7

Browse files
committed
Update docker files and bind python version.
1 parent bb8ad9e commit f8981d7

6 files changed

+34
-13
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dist: trusty
44
sudo: required
55
language: python
66
python:
7-
- "2.7"
7+
- "2.7.15"
88
env:
99
- >
1010
DISTRIBUTION=ubuntu
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
FROM amazonlinux:2
22

33
# This is needed so that ansible managed to read "ansible_default_ipv4"
4-
RUN yum install iproute -y
4+
# This step is needed since standard CentOS docker image does not come with i
5+
# This package seems to be required for Mongo 3.2 and downwards
6+
RUN yum install iproute initscripts -y
57

68
# we can has SSH
79
EXPOSE 22
810

9-
# This step is needed since standard CentOS docker image does not come with i
10-
# This package seems to be required for Mongo 3.2 and downwards
11-
RUN yum install initscripts -y
12-
1311
# pepare for takeoff
1412
CMD ["/usr/sbin/init"]

tests/Dockerfile.centos_6-builded

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
FROM centos:6
22

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

97
# we can has SSH
108
EXPOSE 22

tests/Dockerfile.centos_7-builded

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
FROM centos:7
22

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

97
# we can has SSH
108
EXPOSE 22

tests/Dockerfile.ubuntu_16_04-builded

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@ FROM ubuntu:16.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

5+
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+
518
RUN apt update && \
619
apt install --yes python-minimal iproute2 && \
7-
rm /lib/systemd/system/[email protected]
20+
rm -f /lib/systemd/system/[email protected]
21+

tests/Dockerfile.ubuntu_18_04-builded

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@ FROM ubuntu:18.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

5+
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+
518
RUN apt update && \
619
apt install --yes python-minimal systemd gnupg iproute2
720

0 commit comments

Comments
 (0)