5046975869
This PS updates all dockerfiles to allow base image over-rides as required by many consumers of OSH. Change-Id: I53daac9c1ec4707628565abc912116d8997eba16 Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
49 lines
1.5 KiB
Docker
49 lines
1.5 KiB
Docker
# Copyright 2019, AT&T Intellectual Property
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
ARG BUILD_FROM=ubuntu:16.04
|
|
ARG FROM=nginx
|
|
FROM ${BUILD_FROM} as aptly
|
|
|
|
ARG APTLY_CONFIG_PATH=etc/aptly.conf
|
|
ARG MIRROR_SOURCE_FILE=mini-mirror-sources.yaml
|
|
ARG RELEASE_SIGN_KEY_PATH=etc
|
|
ARG RELEASE_SIGN_KEY_PASSPHRASE
|
|
|
|
RUN apt-get update
|
|
RUN apt-get install -y wget jq python-pip
|
|
RUN pip install yq
|
|
|
|
COPY "${APTLY_CONFIG_PATH}" /etc/aptly.conf
|
|
COPY tools/install_aptly.sh /opt/install_aptly.sh
|
|
|
|
ARG APTLY_INSTALL_FROM=source
|
|
ARG APTLY_REPO=https://github.com/smstone/aptly.git
|
|
ARG APTLY_REFSPEC=allow-custom-codename
|
|
|
|
RUN /opt/install_aptly.sh
|
|
|
|
COPY "${MIRROR_SOURCE_FILE}" /opt/mini-mirror-sources.yaml
|
|
COPY "${RELEASE_SIGN_KEY_PATH}" /opt/release.gpg
|
|
COPY tools/publish_snapshots.sh /opt/publish_snapshots.sh
|
|
|
|
RUN /opt/publish_snapshots.sh "${RELEASE_SIGN_KEY_PASSPHRASE}"
|
|
|
|
FROM ${FROM}
|
|
ARG APTLY_SNAPSHOT_DIR=/srv
|
|
|
|
# NOTE(drewwalters96): This must match the location provided in the NGINX
|
|
# config file.
|
|
COPY --from=aptly /opt/.aptly/public "${APTLY_SNAPSHOT_DIR}"
|