ansible-role-mongodb/tests/Dockerfile.ubuntu_16_04-builded
2019-12-21 23:02:35 +03:00

22 lines
710 B
Docker

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 -f /lib/systemd/system/getty@.service