Align mini-mirror Dockerfile args with build.sh
The mini-mirror build.sh script has somehow ended up out of sync with the Dockerfiles, and is not passing the correct build-args to allow base image overrides. This change aligns with the standard of using BUILD_FROM (ubuntu) for the build stage and FROM (nginx) for the final stage. Relevant earlier changes: 0: https://review.opendev.org/714002 1: https://review.opendev.org/679315 Change-Id: I844efa669c0f11004a44f20f6725338e1d2699b6
This commit is contained in:
parent
db20027842
commit
00401e1d92
|
@ -12,9 +12,9 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ARG FROM_UBUNTU=ubuntu:18.04
|
||||
ARG FROM_NGINX=nginx
|
||||
FROM ${FROM_UBUNTU} as aptly
|
||||
ARG BUILD_FROM=ubuntu:18.04
|
||||
ARG FROM=nginx
|
||||
FROM ${BUILD_FROM} as aptly
|
||||
|
||||
ARG APTLY_CONFIG_PATH=etc/aptly.conf
|
||||
ARG MIRROR_SOURCE_FILE=mini-mirror-sources.yaml
|
||||
|
@ -40,7 +40,7 @@ COPY tools/publish_snapshots.sh /opt/publish_snapshots.sh
|
|||
|
||||
RUN /opt/publish_snapshots.sh "${RELEASE_SIGN_KEY_PASSPHRASE}"
|
||||
|
||||
FROM ${FROM_NGINX}
|
||||
FROM ${FROM}
|
||||
|
||||
ARG APTLY_SNAPSHOT_DIR=/srv
|
||||
|
||||
|
|
|
@ -45,8 +45,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}} \
|
||||
${BASE_IMAGE_UBUNTU:+--build-arg BUILD_FROM=${BASE_IMAGE_UBUNTU}} \
|
||||
${BASE_IMAGE_NGINX:+--build-arg FROM=${BASE_IMAGE_NGINX}} \
|
||||
--build-arg http_proxy="${HTTP_PROXY}" \
|
||||
--build-arg https_proxy="${HTTPS_PROXY}" \
|
||||
--build-arg HTTP_PROXY="${HTTP_PROXY}" \
|
||||
|
|
Loading…
Reference in New Issue