Spencer Gardner 5 vuotta sitten
vanhempi
säilyke
7d14085b61
1 muutettua tiedostoa jossa 9 lisäystä ja 4 poistoa
  1. 9 4
      Dockerfile

+ 9 - 4
Dockerfile

@@ -4,11 +4,16 @@ RUN apk add --update go git gcc g++
 
 ENV GOPATH /go
 
-RUN go get -u github.com/gogs/gogs
 
-WORKDIR $GOPATH/src/github.com/gogs/gogs
+RUN mkdir -p /build/gogs/
 
-RUN go build -tags "sqlite"
+WORKDIR /build/gogs/
+
+RUN git clone --depth 1 https://github.com/gogs/gogs.git gogs
+
+WORKDIR /build/gogs/gogs
+
+RUN go build -o gogs -tags "sqlite"
 
 RUN rm -rf .git vendor conf docker pkg
 
@@ -19,7 +24,7 @@ RUN apk add --update git openssh-keygen bash
 
 ENV USER root
 
-COPY --from=build /go/src/github.com/gogs/gogs /gogs
+COPY --from=build /build/gogs/gogs /gogs
 
 
 WORKDIR /gogs