github.com/timo-reymann/yal@v0.0.0-20240419173834-5d47db58f9d1/Dockerfile (about) 1 FROM scratch as fs 2 COPY ./config /config 3 COPY ./images /images 4 COPY ./icons /icons 5 6 FROM busybox AS bin 7 COPY ./dist /binaries 8 RUN if [[ "$(arch)" == "x86_64" ]]; then \ 9 architecture="amd64"; \ 10 else \ 11 architecture="arm64"; \ 12 fi; \ 13 cp /binaries/yal_linux-${architecture} /bin/yal && \ 14 chmod +x /bin/yal && \ 15 chown 65532:65532 /bin/yal 16 17 FROM scratch 18 19 LABEL org.opencontainers.image.title="yal" 20 LABEL org.opencontainers.image.description="A simple link hub, to display and search links. Allows easy branding, runs with the least privileges and is simple to use." 21 LABEL org.opencontainers.image.ref.name="main" 22 LABEL org.opencontainers.image.licenses='GNU GPL v3' 23 LABEL org.opencontainers.image.vendor="Timo Reymann <mail@timo-reymann.de>" 24 LABEL org.opencontainers.image.authors="Timo Reymann <mail@timo-reymann.de>" 25 LABEL org.opencontainers.image.url="https://github.com/timo-reymann/yal" 26 LABEL org.opencontainers.image.documentation="https://github.com/timo-reymann/yal" 27 LABEL org.opencontainers.image.source="https://github.com/timo-reymann/yal.git" 28 29 ENV YAL_PORT=2024 30 ENV YAL_MASCOT=mascot 31 ENV YAL_LOGO=logo 32 ENV YAL_BACKGROUND=background 33 ENV YAL_FAVICON=favicon 34 ENV YAL_CONFIG_FOLDER=/app/config 35 ENV YAL_IMAGES_FOLDER=/app/images 36 37 COPY --from=gcr.io/distroless/static-debian12:nonroot / / 38 USER nonroot 39 40 WORKDIR /app 41 COPY --from=bin /bin/yal . 42 COPY --from=fs / ./ 43 44 ENTRYPOINT [ "/app/yal" ] 45 CMD [ "-serve" ]