Update docker files and bind python version.
This commit is contained in:
parent
bb8ad9e555
commit
f8981d7c45
|
@ -4,7 +4,7 @@ dist: trusty
|
|||
sudo: required
|
||||
language: python
|
||||
python:
|
||||
- "2.7"
|
||||
- "2.7.15"
|
||||
env:
|
||||
- >
|
||||
DISTRIBUTION=ubuntu
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
FROM amazonlinux:2
|
||||
|
||||
# This is needed so that ansible managed to read "ansible_default_ipv4"
|
||||
RUN yum install iproute -y
|
||||
# This step is needed since standard CentOS docker image does not come with i
|
||||
# This package seems to be required for Mongo 3.2 and downwards
|
||||
RUN yum install iproute initscripts -y
|
||||
|
||||
# we can has SSH
|
||||
EXPOSE 22
|
||||
|
||||
# This step is needed since standard CentOS docker image does not come with i
|
||||
# This package seems to be required for Mongo 3.2 and downwards
|
||||
RUN yum install initscripts -y
|
||||
|
||||
# pepare for takeoff
|
||||
CMD ["/usr/sbin/init"]
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
FROM centos:6
|
||||
|
||||
# This is needed so that ansible managed to read "ansible_default_ipv4"
|
||||
RUN yum install iproute -y
|
||||
|
||||
# This step is needed since standard CentOS docker image does not come with EPEL installed by default
|
||||
RUN yum install epel-release -y
|
||||
RUN yum install iproute epel-release -y
|
||||
|
||||
# we can has SSH
|
||||
EXPOSE 22
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
FROM centos:7
|
||||
|
||||
# This is needed so that ansible managed to read "ansible_default_ipv4"
|
||||
RUN yum install iproute -y
|
||||
|
||||
# This step is needed since standard CentOS docker image does not come with EPEL installed by default
|
||||
RUN yum install epel-release -y
|
||||
RUN yum install iproute epel-release -y
|
||||
|
||||
# we can has SSH
|
||||
EXPOSE 22
|
||||
|
|
|
@ -2,6 +2,20 @@ FROM ubuntu:16.04
|
|||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt update && \
|
||||
apt install --yes python-pip curl jq && \
|
||||
pip install apt-select && \
|
||||
EXTERNAL_IP=`curl -s https://ipinfo.io/ip` && \
|
||||
echo "EXTERNAL_IP is ${EXTERNAL_IP}" && \
|
||||
DATA_IP=`curl -s https://json.geoiplookup.io/$EXTERNAL_IP` && \
|
||||
echo $DATA_IP && \
|
||||
COUNTRY_IP=`echo $DATA_IP | jq '.country_code' | tr -d '"'` && \
|
||||
apt-select -C $COUNTRY_IP -t 1 -m one-week-behind && \
|
||||
cat sources.list && \
|
||||
cp /etc/apt/sources.list /etc/apt/sources.list.backup && \
|
||||
mv -f sources.list /etc/apt/
|
||||
|
||||
RUN apt update && \
|
||||
apt install --yes python-minimal iproute2 && \
|
||||
rm /lib/systemd/system/getty@.service
|
||||
rm -f /lib/systemd/system/getty@.service
|
||||
|
||||
|
|
|
@ -2,6 +2,19 @@ FROM ubuntu:18.04
|
|||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt update && \
|
||||
apt install --yes python-pip curl jq && \
|
||||
pip install apt-select && \
|
||||
EXTERNAL_IP=`curl -s https://ipinfo.io/ip` && \
|
||||
echo "EXTERNAL_IP is ${EXTERNAL_IP}" && \
|
||||
DATA_IP=`curl -s https://json.geoiplookup.io/$EXTERNAL_IP` && \
|
||||
echo $DATA_IP && \
|
||||
COUNTRY_IP=`echo $DATA_IP | jq '.country_code' | tr -d '"'` && \
|
||||
apt-select -C $COUNTRY_IP -t 1 -m one-week-behind && \
|
||||
cat sources.list && \
|
||||
cp /etc/apt/sources.list /etc/apt/sources.list.backup && \
|
||||
mv -f sources.list /etc/apt/
|
||||
|
||||
RUN apt update && \
|
||||
apt install --yes python-minimal systemd gnupg iproute2
|
||||
|
||||
|
|
Loading…
Reference in New Issue