Skip to content

Commit

Permalink
Avoid variable expansion in --from and FROM being odd
Browse files Browse the repository at this point in the history
  • Loading branch information
bryteise committed Jun 14, 2024
1 parent aff755f commit 01b8d96
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
ARG clear_ver
FROM ghcr.io/bryteise/os-core:$clear_ver AS core
FROM clearlinux:latest AS builder
ARG clear_ver

ARG clear_ver
ARG swupd_args
# Move to latest Clear Linux release to ensure
# that the swupd command line arguments are
Expand All @@ -10,8 +11,7 @@ RUN swupd update --no-boot-update -V $clear_ver $swupd_args

# Grab os-release info from the minimal base image so
# that the new content matches the exact OS version
COPY --from=ghcr.io/bryteise/os-core:$clear_ver /usr/lib/os-release /
ARG clear_ver
COPY --from=core /usr/lib/os-release /

# Install additional content in a target directory
# using the os version from the minimal base
Expand All @@ -26,13 +26,11 @@ RUN source /os-release && \
# file exists on different layers. To minimize docker
# image size, remove the overlapped files before copy.
RUN mkdir /os_core_install
ARG clear_ver
COPY --from=ghcr.io/bryteise/os-core:$clear_ver / /os_core_install/
ARG clear_ver
COPY --from=core / /os_core_install/
RUN cd / && \
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true

FROM ghcr.io/bryteise/os-core:$clear_ver
FROM core

COPY --from=builder /install_root /
COPY default.conf /etc/nginx-mainline/conf.d/default.conf
Expand Down

0 comments on commit 01b8d96

Please sign in to comment.