openstack-helm-images/mini-mirror/Dockerfile.ubuntu_xenial

40 lines
1.2 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.
FROM ubuntu:16.04 as aptly
ARG APTLY_CONFIG_PATH=etc/aptly.conf
ARG MIRROR_SOURCE_DIR=sources
ARG RELEASE_SIGN_KEY_PATH=etc
ARG RELEASE_SIGN_KEY_PASSPHRASE
COPY "${APTLY_CONFIG_PATH}" /etc/aptly.conf
COPY "${MIRROR_SOURCE_DIR}" /opt/sources
COPY "${RELEASE_SIGN_KEY_PATH}" /opt/release.gpg
COPY tools/publish_snapshots.sh /opt/publish_snapshots.sh
RUN apt-get update
RUN apt-get install -y aptly wget
RUN /opt/publish_snapshots.sh "${RELEASE_SIGN_KEY_PASSPHRASE}"
FROM nginx
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}"