Merge "Add base image overrides to mini-mirror image"

This commit is contained in:
Zuul 2020-03-28 17:16:13 +00:00 committed by Gerrit Code Review
commit 7cf31e02d8
3 changed files with 12 additions and 4 deletions

View File

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM ubuntu:18.04 as aptly
ARG FROM_UBUNTU=ubuntu:18.04
ARG FROM_NGINX=nginx
FROM ${FROM_UBUNTU} as aptly
ARG APTLY_CONFIG_PATH=etc/aptly.conf
ARG MIRROR_SOURCE_FILE=mini-mirror-sources.yaml
@ -38,7 +40,7 @@ COPY tools/publish_snapshots.sh /opt/publish_snapshots.sh
RUN /opt/publish_snapshots.sh "${RELEASE_SIGN_KEY_PASSPHRASE}"
FROM nginx
FROM ${FROM_NGINX}
ARG APTLY_SNAPSHOT_DIR=/srv

View File

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM ubuntu:16.04 as aptly
ARG FROM_UBUNTU=ubuntu:16.04
ARG FROM_NGINX=nginx
FROM ${FROM_UBUNTU} as aptly
ARG APTLY_CONFIG_PATH=etc/aptly.conf
ARG MIRROR_SOURCE_FILE=mini-mirror-sources.yaml
@ -38,7 +40,7 @@ COPY tools/publish_snapshots.sh /opt/publish_snapshots.sh
RUN /opt/publish_snapshots.sh "${RELEASE_SIGN_KEY_PASSPHRASE}"
FROM nginx
FROM ${FROM_NGINX}
ARG APTLY_SNAPSHOT_DIR=/srv

View File

@ -22,6 +22,8 @@ cd "${SCRIPT_DIR}"/.. || exit
PROJECT_PATH="mini-mirror"
IMAGE=${IMAGE:-mini-mirror}
BASE_IMAGE_UBUNTU=${BASE_IMAGE_UBUNTU:-}
BASE_IMAGE_NGINX=${BASE_IMAGE_NGINX:-}
VERSION=${VERSION:-latest}
DISTRO=${DISTRO:-ubuntu_xenial}
REGISTRY_URI=${REGISTRY_URI:-"openstackhelm/"}
@ -45,6 +47,8 @@ APTLY_REFSPEC=${APTLY_REFSPEC:-"allow-custom-codename"}
docker build -f "${PROJECT_PATH}"/Dockerfile."${DISTRO}" --network=host \
-t "${REGISTRY_URI}""${IMAGE}":"${VERSION}"-"${DISTRO}""${EXTRA_TAG_INFO}" \
${BASE_IMAGE_UBUNTU:+--build-arg FROM_UBUNTU=${BASE_IMAGE_UBUNTU}} \
${BASE_IMAGE_NGINX:+--build-arg FROM_NGINX=${BASE_IMAGE_NGINX}} \
--build-arg http_proxy="${HTTP_PROXY}" \
--build-arg https_proxy="${HTTPS_PROXY}" \
--build-arg HTTP_PROXY="${HTTP_PROXY}" \