Commit ac398b33 authored by Sven-Hendrik Haase's avatar Sven-Hendrik Haase
Browse files

Merge branch 'fix/dockerHubLibraryBuilds' into 'master'

Switch to alpine in verify stage

See merge request archlinux/archlinux-docker!47
parents d4bfcb13 9c5a9ccc
...@@ -12,8 +12,8 @@ stages: ...@@ -12,8 +12,8 @@ stages:
lint: lint:
stage: lint stage: lint
image: hadolint/hadolint:latest image: hadolint/hadolint:latest
# DL3007: We use the latest tag for multistage build # DL3018: We don't need alpine version pins
script: hadolint --ignore DL3007 --ignore DL3020 Dockerfile.template script: hadolint --ignore DL3018 Dockerfile.template
except: except:
- releases - releases
- tags - tags
......
...@@ -8,13 +8,14 @@ ...@@ -8,13 +8,14 @@
# The second stage is for actually configuring the system a little bit. # The second stage is for actually configuring the system a little bit.
# Some templating is done in order to allow us to easily build different configurations and to # Some templating is done in order to allow us to easily build different configurations and to
# allow us to automate the releaes process. # allow us to automate the releaes process.
FROM archlinux:latest AS verify FROM alpine:3.12 AS verify
COPY TEMPLATE_ROOTFS_FILE / COPY TEMPLATE_ROOTFS_FILE /
RUN apk add --no-cache curl bash
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
RUN ROOTFS="$(curl -OJL --continue-at - -w "%{filename_effective}" TEMPLATE_ROOTFS_URL)" && \ RUN ROOTFS="$(curl -sOJL --continue-at - -w "%{filename_effective}" TEMPLATE_ROOTFS_URL)" && \
sha256sum -c <<< "TEMPLATE_ROOTFS_HASH" && \ sha256sum -c <<< "TEMPLATE_ROOTFS_HASH" && \
mkdir /rootfs && \ mkdir /rootfs && \
tar -C /rootfs --extract --auto-compress --file "${ROOTFS}" tar -C /rootfs --extract --file "${ROOTFS}"
FROM scratch AS root FROM scratch AS root
COPY --from=verify /rootfs/ / COPY --from=verify /rootfs/ /
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment