Clean up golang alpine, update to newer version of go
This commit is contained in:
parent
38b8ee075f
commit
98c4cd540a
1 changed files with 3 additions and 5 deletions
|
@ -1,14 +1,12 @@
|
||||||
FROM golang:alpine
|
FROM golang:1.17-alpine3.14
|
||||||
|
|
||||||
# add ca-certificates package
|
|
||||||
RUN apk add --no-cache ca-certificates git && \
|
RUN apk add --no-cache ca-certificates git && \
|
||||||
go get -u -d github.com/mattes/migrate/cli github.com/lib/pq && \
|
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest && \
|
||||||
go build -tags 'postgres' -o ${GOPATH}/bin/migrate github.com/mattes/migrate/cli && \
|
|
||||||
mkdir -p ${GOPATH}/src/git.minhas.io/asara && \
|
mkdir -p ${GOPATH}/src/git.minhas.io/asara && \
|
||||||
cd ${GOPATH}/src/git.minhas.io/asara && \
|
cd ${GOPATH}/src/git.minhas.io/asara && \
|
||||||
git clone https://git.minhas.io/asara/sudoscientist-go-backend && \
|
git clone https://git.minhas.io/asara/sudoscientist-go-backend && \
|
||||||
cd ${GOPATH}/src/git.minhas.io/asara/sudoscientist-go-backend && \
|
cd ${GOPATH}/src/git.minhas.io/asara/sudoscientist-go-backend && \
|
||||||
go get && go build main.go && \
|
go mod init && go get && go build main.go && \
|
||||||
mv /go/bin/* /usr/local/bin/ && \
|
mv /go/bin/* /usr/local/bin/ && \
|
||||||
rm -rf /go/src && \
|
rm -rf /go/src && \
|
||||||
apk del git
|
apk del git
|
||||||
|
|
Loading…
Reference in a new issue