fixed issue where too much data was copied at every build, leading to
unnecessary build.
This commit is contained in:
parent
8683949132
commit
f5d8a5a424
@ -8,11 +8,15 @@ RUN curl -L https://github.com/a-h/templ/releases/download/v0.2.747/templ_Linux_
|
|||||||
tar xvzf templ.tar.gz templ && \
|
tar xvzf templ.tar.gz templ && \
|
||||||
chmod 755 templ && \
|
chmod 755 templ && \
|
||||||
mv templ /bin
|
mv templ /bin
|
||||||
COPY cmd pkg static go.mod go.sum /opt/converge/
|
COPY go.mod go.sum /opt/converge/
|
||||||
|
COPY static /opt/converge/static
|
||||||
|
COPY pkg /opt/converge/pkg
|
||||||
|
COPY cmd /opt/converge/cmd
|
||||||
|
|
||||||
|
RUN find /opt/converge -type d
|
||||||
WORKDIR /opt/converge
|
WORKDIR /opt/converge
|
||||||
ENV GOTOOLCHAIN=auto
|
ENV GOTOOLCHAIN=auto
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
COPY . /opt/converge/
|
|
||||||
RUN templ generate
|
RUN templ generate
|
||||||
RUN go build -ldflags "-linkmode 'external' -extldflags '-static'" -o bin ./cmd/...
|
RUN go build -ldflags "-linkmode 'external' -extldflags '-static'" -o bin ./cmd/...
|
||||||
RUN GOOS=windows GOARCH=amd64 go build -o bin ./cmd/...
|
RUN GOOS=windows GOARCH=amd64 go build -o bin ./cmd/...
|
||||||
|
Loading…
Reference in New Issue
Block a user