mirror of
https://github.com/status-im/ansible-role-mongodb.git
synced 2025-01-26 04:59:03 +00:00
22 lines
710 B
Docker
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
|
|
|