refactor: drop qemu binary requirement (#2116)

QEMU binaries no longer need to be baked into containers.
pull/2115/head
Amir Zarrinkafsh 2021-06-24 18:24:47 +10:00 committed by GitHub
parent 5c78dfaa0d
commit 8db0bc9ae1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 22 deletions

View File

@ -28,11 +28,8 @@ FROM arm32v7/alpine:3.14.0
WORKDIR /app WORKDIR /app
COPY ./qemu-arm-static /usr/bin/qemu-arm-static
RUN \ RUN \
apk --no-cache add ca-certificates su-exec tzdata && \ apk --no-cache add ca-certificates su-exec tzdata
rm /usr/bin/qemu-arm-static
COPY --from=builder-backend /go/src/app/authelia /go/src/app/LICENSE /go/src/app/entrypoint.sh /go/src/app/healthcheck.sh ./ COPY --from=builder-backend /go/src/app/authelia /go/src/app/LICENSE /go/src/app/entrypoint.sh /go/src/app/healthcheck.sh ./

View File

@ -28,11 +28,8 @@ FROM arm64v8/alpine:3.14.0
WORKDIR /app WORKDIR /app
COPY ./qemu-aarch64-static /usr/bin/qemu-aarch64-static
RUN \ RUN \
apk --no-cache add ca-certificates su-exec tzdata && \ apk --no-cache add ca-certificates su-exec tzdata
rm /usr/bin/qemu-aarch64-static
COPY --from=builder-backend /go/src/app/authelia /go/src/app/LICENSE /go/src/app/entrypoint.sh /go/src/app/healthcheck.sh ./ COPY --from=builder-backend /go/src/app/authelia /go/src/app/LICENSE /go/src/app/entrypoint.sh /go/src/app/healthcheck.sh ./

View File

@ -46,8 +46,6 @@ func dockerBuildOfficialImage(arch string) error {
docker := &Docker{} docker := &Docker{}
// Set default Architecture Dockerfile to amd64. // Set default Architecture Dockerfile to amd64.
dockerfile := "Dockerfile" dockerfile := "Dockerfile"
// Set version of QEMU.
qemuversion := "v5.2.0-2"
// If not the default value. // If not the default value.
if arch != defaultArch { if arch != defaultArch {
@ -61,12 +59,6 @@ func dockerBuildOfficialImage(arch string) error {
log.Fatal(err) log.Fatal(err)
} }
} }
err := utils.CommandWithStdout("bash", "-c", "wget https://github.com/multiarch/qemu-user-static/releases/download/"+qemuversion+"/qemu-arm-static -O ./qemu-arm-static && chmod +x ./qemu-arm-static").Run()
if err != nil {
log.Fatal(err)
}
} else if arch == "arm64v8" { } else if arch == "arm64v8" {
if buildkiteQEMU != stringTrue { if buildkiteQEMU != stringTrue {
err := utils.CommandWithStdout("docker", "run", "--rm", "--privileged", "multiarch/qemu-user-static", "--reset", "-p", "yes").Run() err := utils.CommandWithStdout("docker", "run", "--rm", "--privileged", "multiarch/qemu-user-static", "--reset", "-p", "yes").Run()
@ -74,12 +66,6 @@ func dockerBuildOfficialImage(arch string) error {
log.Fatal(err) log.Fatal(err)
} }
} }
err := utils.CommandWithStdout("bash", "-c", "wget https://github.com/multiarch/qemu-user-static/releases/download/"+qemuversion+"/qemu-aarch64-static -O ./qemu-aarch64-static && chmod +x ./qemu-aarch64-static").Run()
if err != nil {
log.Fatal(err)
}
} }
flags, err := getXFlags(ciBranch, os.Getenv("BUILDKITE_BUILD_NUMBER"), "") flags, err := getXFlags(ciBranch, os.Getenv("BUILDKITE_BUILD_NUMBER"), "")