workaround: Dockerfile for codeberg.org corrupted container images
https://codeberg.org/forgejo/forgejo/issues/26 https://codeberg.org/Codeberg/Community/issues/800 sed -i -e 's|^FROM.*golang.*|FROM codeberg.org/forgejo/golang:1.19-alpine3.17 AS build-env|' Dockerfile sed -i -e 's|^FROM.*alpine:.*|FROM codeberg.org/forgejo/alpine:3.17.0|' Dockerfile Signed-off-by: Loïc Dachary <loic@dachary.org>forgejo
parent
7fb4e9c4de
commit
9a69ea5d2d
12
Dockerfile
12
Dockerfile
|
@ -1,5 +1,5 @@
|
||||||
#Build stage
|
#Build stage
|
||||||
FROM golang:1.19-alpine3.17 AS build-env
|
FROM codeberg.org/forgejo/golang:1.19-alpine3.17 AS build-env
|
||||||
|
|
||||||
ARG GOPROXY
|
ARG GOPROXY
|
||||||
ENV GOPROXY ${GOPROXY:-direct}
|
ENV GOPROXY ${GOPROXY:-direct}
|
||||||
|
@ -23,7 +23,7 @@ RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \
|
||||||
# Begin env-to-ini build
|
# Begin env-to-ini build
|
||||||
RUN go build contrib/environment-to-ini/environment-to-ini.go
|
RUN go build contrib/environment-to-ini/environment-to-ini.go
|
||||||
|
|
||||||
FROM alpine:3.17
|
FROM codeberg.org/forgejo/alpine:3.17.0
|
||||||
LABEL maintainer="contact@forgejo.org"
|
LABEL maintainer="contact@forgejo.org"
|
||||||
|
|
||||||
EXPOSE 22 3000
|
EXPOSE 22 3000
|
||||||
|
@ -64,5 +64,9 @@ CMD ["/bin/s6-svscan", "/etc/s6"]
|
||||||
COPY docker/root /
|
COPY docker/root /
|
||||||
COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
|
COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
|
||||||
COPY --from=build-env /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
|
COPY --from=build-env /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
|
||||||
RUN chmod 755 /usr/bin/entrypoint /app/gitea/gitea /usr/local/bin/gitea /usr/local/bin/environment-to-ini
|
#
|
||||||
RUN chmod 755 /etc/s6/gitea/* /etc/s6/openssh/* /etc/s6/.s6-svscan/*
|
# s/755/775/ in the following is to avoid the corrupted layer 4f4fb700ef54
|
||||||
|
# https://codeberg.org/Codeberg/Community/issues/800#issue-210309
|
||||||
|
#
|
||||||
|
RUN chmod 775 /usr/bin/entrypoint /app/gitea/gitea /usr/local/bin/gitea /usr/local/bin/environment-to-ini
|
||||||
|
RUN chmod 775 /etc/s6/gitea/* /etc/s6/openssh/* /etc/s6/.s6-svscan/*
|
||||||
|
|
Loading…
Reference in New Issue