diff --git a/Dockerfile b/Dockerfile index c5f156597..5df4b8429 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,10 @@ RUN echo "Write tag ${BUILD_TAG} and commit ${BUILD_COMMIT} in binary." && \ sed -i "s/__BUILD_TIME__/${BUILD_TIME}/" cmd/authelia/constants.go # CGO_ENABLED=1 is mandatory for building go-sqlite3 -RUN cd cmd/authelia && GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -tags netgo -ldflags '-w' -o authelia +RUN cd cmd/authelia && GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -tags netgo -ldflags '-w' -o authelia && cd ../../ + +# CGO_ENABLED=1 is mandatory for building go-sqlite3 +RUN cd cmd/authelia-scripts && GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -o authelia-scripts # ======================================== @@ -51,6 +54,7 @@ RUN apk --no-cache add ca-certificates tzdata WORKDIR /usr/app COPY --from=builder-backend /go/src/app/cmd/authelia/authelia authelia +COPY --from=builder-backend /go/src/app/cmd/authelia-scripts/authelia-scripts authelia-scripts COPY --from=builder-frontend /node/src/app/build public_html EXPOSE 9091 diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index 3e78508b4..01fa4106d 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 @@ -28,7 +28,10 @@ RUN echo "Write tag ${BUILD_TAG} and commit ${BUILD_COMMIT} in binary." && \ sed -i "s/__BUILD_TIME__/${BUILD_TIME}/" cmd/authelia/constants.go # CGO_ENABLED=1 is mandatory for building go-sqlite3 -RUN cd cmd/authelia && GOOS=linux GOARCH=arm CGO_ENABLED=1 go build -tags netgo -ldflags '-w' -o authelia +RUN cd cmd/authelia && GOOS=linux GOARCH=arm CGO_ENABLED=1 go build -tags netgo -ldflags '-w' -o authelia && cd ../../ + +# CGO_ENABLED=1 is mandatory for building go-sqlite3 +RUN cd cmd/authelia-scripts && GOOS=linux GOARCH=arm CGO_ENABLED=1 go build -o authelia-scripts # ======================================== @@ -55,6 +58,7 @@ RUN apk --no-cache add ca-certificates tzdata && \ WORKDIR /usr/app COPY --from=builder-backend /go/src/app/cmd/authelia/authelia authelia +COPY --from=builder-backend /go/src/app/cmd/authelia-scripts/authelia-scripts authelia-scripts COPY --from=builder-frontend /node/src/app/build public_html EXPOSE 9091 diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 index da11d2c2f..fc3da9129 100644 --- a/Dockerfile.arm64v8 +++ b/Dockerfile.arm64v8 @@ -28,7 +28,10 @@ RUN echo "Write tag ${BUILD_TAG} and commit ${BUILD_COMMIT} in binary." && \ sed -i "s/__BUILD_TIME__/${BUILD_TIME}/" cmd/authelia/constants.go # CGO_ENABLED=1 is mandatory for building go-sqlite3 -RUN cd cmd/authelia && GOOS=linux GOARCH=arm64 CGO_ENABLED=1 go build -tags netgo -ldflags '-w' -o authelia +RUN cd cmd/authelia && GOOS=linux GOARCH=arm64 CGO_ENABLED=1 go build -tags netgo -ldflags '-w' -o authelia && cd ../../ + +# CGO_ENABLED=1 is mandatory for building go-sqlite3 +RUN cd cmd/authelia-scripts && GOOS=linux GOARCH=arm64 CGO_ENABLED=1 go build -o authelia-scripts # ======================================== @@ -55,6 +58,7 @@ RUN apk --no-cache add ca-certificates tzdata && \ WORKDIR /usr/app COPY --from=builder-backend /go/src/app/cmd/authelia/authelia authelia +COPY --from=builder-backend /go/src/app/cmd/authelia-scripts/authelia-scripts authelia-scripts COPY --from=builder-frontend /node/src/app/build public_html EXPOSE 9091