Problema
- Não consigo fazer um build de um Dockerfile por conta do
apt-get update
, mesmo configurando o proxy - Proxy local configurado e arquivo /etc/default/docker
Realizar os seguintes passos
git clone https://github.com/camptocamp/docker-puppet-agent.git
cd docker-puppet-agent
docker build -t puppet-agent .
Log de erro:
Step 8 : RUN apt-get -qq update
---> Running in d9d4f2db1a9f
W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg Could not resolve 'br.archive.ubuntu.com'
W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg Could not resolve 'br.archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg Could not resolve 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
---> a4882292c36f
Removing intermediate container d9d4f2db1a9f
Step 9 : RUN apt-get -qq -y install curl
---> Running in 08c1ce85f403
E: Unable to locate package curl
The command '/bin/sh -c apt-get -qq -y install curl' returned a non-zero code: 100
O conteúdo do Dockerfile que ajustei para tentar sanar o problema, mas sem sucesso
FROM ubuntu:trusty
MAINTAINER mickael.canevet@camptocamp.com
# testar
# apt-add-repository ppa:ondrej/php
RUN dpkg --add-architecture amd64
ADD sources.list /etc/apt/sources.list
ENV RELEASE=trusty
ENV PUPPET_AGENT_VERSION 1.3.0-1${RELEASE}
ENV PATH=/opt/puppetlabs/bin:$PATH
RUN apt-get -qq update
RUN apt-get -qq -y install curl
RUN curl -O http://apt.puppetlabs.com/puppetlabs-release-pc1-${RELEASE}.deb
RUN dpkg -i puppetlabs-release-pc1-${RELEASE}.deb
RUN rm -rf /var/lib/apt/lists/*
ENV LANGUAGE=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
RUN apt-get update \
&& apt-get install -y puppet-agent=$PUPPET_AGENT_VERSION \
&& rm -rf /var/lib/apt/lists/*
arquivo /etc/default/docker
# Docker Upstart and SysVinit configuration file
# Customize location of Docker binary (especially for development testing).
#DOCKER="/usr/local/bin/docker"
# Use DOCKER_OPTS to modify the daemon startup options.
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
# If you need Docker to use an HTTP proxy, it can also be specified here.
export http_proxy="http://127.0.0.1:5865/"
# This is also a handy place to tweak where Docker's temporary files go.
#export TMPDIR="/mnt/bigdrive/docker-tmp"