Allow to build fuel/fuel-centos-build docker image through proxy
Building ISO through proxy is possible out of the box by: * defining http_proxy variable, for example export http_proxy=http://proxy_ip_address:proxy_port export https_proxy=https://proxy_ip_address:proxy_port export no_proxy=localhost make iso \ PROXY_CONFIG="http_proxy=http://proxy_ip_address:proxy_port \ https_proxy=https://proxy_ip_address:proxy_port \ no_proxy=localhost" * allowing to bypass http_proxy variable for sudo operations, by updating sudoerc configuration file, for example: Defaults env_keep += "http_proxy https_proxy no_proxy" The only thing which needs to be updated - bypassing proxy for docker build operation. This patch introduces this change Change-Id: I2b5c7a071bec7448070395f88565701539a9adef Related-bug: #1538698
This commit is contained in:
parent
c2bae141ba
commit
d34ffc1338
|
@ -245,3 +245,7 @@ SANDBOX_COPY_CERTS?=0
|
|||
# \apt/metadata.json
|
||||
# \concat/metadata.json
|
||||
USE_PREDEFINED_FUEL_LIB_PUPPET_MODULES?=
|
||||
|
||||
# proxy configuration in format:
|
||||
# PROXY_CONFIG="http_proxy=http://proxy_ip_address:proxy_port https_proxy=https://proxy_ip_address:proxy_port no_proxy=localhost"
|
||||
PROXY_CONFIG?=
|
||||
|
|
|
@ -7,9 +7,9 @@ ENV container docker
|
|||
ENV EXTRA_RPM_REPOS _EXTRA_RPM_REPOS_
|
||||
|
||||
RUN echo _CENTOS_RELEASE_ > /etc/yum/vars/releasever
|
||||
RUN yum --disablerepo=* --enablerepo=C_CENTOS_RELEASE_-base --enablerepo=C_CENTOS_RELEASE_-extras --enablerepo=C_CENTOS_RELEASE_-updates -y update
|
||||
RUN _PROXY_ yum --disablerepo=* --enablerepo=C_CENTOS_RELEASE_-base --enablerepo=C_CENTOS_RELEASE_-extras --enablerepo=C_CENTOS_RELEASE_-updates -y update
|
||||
RUN yum clean all
|
||||
RUN yum --disablerepo=* --enablerepo=C_CENTOS_RELEASE_-base --enablerepo=C_CENTOS_RELEASE_-extras --enablerepo=C_CENTOS_RELEASE_-updates -y install dbus
|
||||
RUN _PROXY_ yum --disablerepo=* --enablerepo=C_CENTOS_RELEASE_-base --enablerepo=C_CENTOS_RELEASE_-extras --enablerepo=C_CENTOS_RELEASE_-updates -y install dbus
|
||||
|
||||
RUN systemctl mask dev-mqueue.mount dev-hugepages.mount \
|
||||
systemd-remount-fs.service sys-kernel-config.mount \
|
||||
|
|
|
@ -61,6 +61,7 @@ $(BUILD_DIR)/docker/fuel-centos.done: \
|
|||
test -n "$(EXTRA_RPM_REPOS)" || sed -e "/_EXTRA_RPM_REPOS_/d" -i $(BUILD_DIR)/docker/fuel-centos-build/Dockerfile
|
||||
sed -e "s|_CENTOS_RELEASE_|$(CENTOS_RELEASE)|g" -i $(BUILD_DIR)/docker/fuel-centos-build/Dockerfile
|
||||
sed -e "s|_EXTRA_RPM_REPOS_|$(EXTRA_RPM_REPOS)|" -i $(BUILD_DIR)/docker/fuel-centos-build/Dockerfile
|
||||
sed -e "s|_PROXY_|$(PROXY_CONFIG)|g" -i $(BUILD_DIR)/docker/fuel-centos-build/Dockerfile
|
||||
sudo docker build -t fuel/fuel-centos-build $(BUILD_DIR)/docker/fuel-centos-build
|
||||
mkdir -p $(BUILD_DIR)/docker/fuel-centos/
|
||||
echo ">>> Generating fuel/centos base image..."
|
||||
|
|
Loading…
Reference in New Issue