Fix permission issues with go.mod by using a writable copy
This commit is contained in:
@ -98,14 +98,18 @@ WORKDIR /app/code
|
||||
|
||||
# Clone the ente repository during build (for the Museum server)
|
||||
RUN git clone --depth=1 https://github.com/ente-io/ente.git . && \
|
||||
sed -i 's/go 1.23/go 1.24.1/' server/go.mod
|
||||
sed -i 's/go 1.23/go 1.24.1/' server/go.mod && \
|
||||
mkdir -p /app/data/go && \
|
||||
cp -r server/go.mod server/go.sum /app/data/go/ && \
|
||||
chmod 777 /app/data/go/go.mod /app/data/go/go.sum
|
||||
|
||||
# Set Go environment variables
|
||||
ENV GOTOOLCHAIN=local
|
||||
ENV GO111MODULE=on
|
||||
ENV GOFLAGS="-mod=mod"
|
||||
ENV GOFLAGS="-modfile=/app/data/go/go.mod -mod=mod"
|
||||
ENV PATH="/usr/local/go/bin:${PATH}"
|
||||
ENV GOSUMDB=off
|
||||
ENV GOMODCACHE="/app/data/go/pkg/mod"
|
||||
|
||||
# Copy the web app built files from the first stage
|
||||
COPY --from=web-builder /build/web/photos /app/web/photos
|
||||
|
Reference in New Issue
Block a user