[skip-ci] Define ENV vars and COPY PATH ../docker/root
This commit is contained in:
parent
1c42e87f24
commit
fe7d3ac227
1 changed files with 11 additions and 10 deletions
|
@ -1,29 +1,30 @@
|
||||||
#Build stage
|
#Build stage
|
||||||
FROM docker.io/library/golang:1.20-alpine3.17 AS build-env
|
FROM docker.io/library/golang:1.20.4-alpine3.18 AS build-env
|
||||||
|
|
||||||
ARG GOPROXY
|
ARG GOPROXY
|
||||||
ENV GOPROXY ${GOPROXY:-direct}
|
ENV GOPROXY ${GOPROXY:-direct}
|
||||||
|
|
||||||
ARG GITEA_VERSION
|
#ARG GITEA_VERSION
|
||||||
ARG TAGS="sqlite sqlite_unlock_notify"
|
ARG TAGS="sqlite sqlite_unlock_notify"
|
||||||
ENV TAGS "bindata timetzdata $TAGS"
|
ENV TAGS "bindata timetzdata $TAGS"
|
||||||
ARG CGO_EXTRA_CFLAGS
|
ARG CGO_EXTRA_CFLAGS
|
||||||
|
|
||||||
ARG FORGEJO_GIT_URL="https://codeberg.org/forgejo/forgejo.git"
|
ENV FORGEJO_GIT_URL "https://codeberg.org/forgejo/forgejo.git"
|
||||||
ARG FORGEJO_BRANCH="forgejo-federation"
|
ENV FORGEJO_BRANCH "forgejo-federation"
|
||||||
ARG FORGEJO_FOLDER="forgejo-fed"
|
#ENV FORGEJO_FOLDER "forgejo-fed"
|
||||||
|
|
||||||
#Build deps
|
#Build deps
|
||||||
RUN apk --no-cache add build-base git nodejs npm
|
RUN apk --no-cache add build-base git nodejs npm
|
||||||
|
|
||||||
#Setup repo
|
#Setup repo
|
||||||
RUN git clone --single-branch --branch FORGEJO_BRANCH FORGEJO_GIT_URL FORGEJO_FOLDER
|
RUN git clone --single-branch --branch ${FORGEJO_BRANCH} ${FORGEJO_GIT_URL} ${GOPATH}/src/code.gitea.io/gitea
|
||||||
COPY FORGEJO_FOLDER/* ${GOPATH}/src/code.gitea.io/gitea
|
#${FORGEJO_FOLDER}
|
||||||
|
#COPY ${FORGEJO_FOLDER} ${GOPATH}/src/code.gitea.io/gitea
|
||||||
WORKDIR ${GOPATH}/src/code.gitea.io/gitea
|
WORKDIR ${GOPATH}/src/code.gitea.io/gitea
|
||||||
|
|
||||||
#Checkout version if set
|
#Checkout version if set
|
||||||
RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \
|
#RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \
|
||||||
&& make clean-all build
|
RUN make clean-all build
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -67,7 +68,7 @@ VOLUME ["/data"]
|
||||||
ENTRYPOINT ["/usr/bin/entrypoint"]
|
ENTRYPOINT ["/usr/bin/entrypoint"]
|
||||||
CMD ["/bin/s6-svscan", "/etc/s6"]
|
CMD ["/bin/s6-svscan", "/etc/s6"]
|
||||||
|
|
||||||
COPY docker/root /
|
COPY --from=build-env /go/src/code.gitea.io/gitea/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
|
||||||
COPY --from=build-env /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete /etc/profile.d/gitea_bash_autocomplete.sh
|
COPY --from=build-env /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete /etc/profile.d/gitea_bash_autocomplete.sh
|
||||||
|
|
Loading…
Reference in a new issue