2022-03-26 22:05:38 +00:00
|
|
|
FROM golang:alpine
|
2021-01-17 01:45:50 +00:00
|
|
|
|
2022-12-31 21:04:53 +00:00
|
|
|
RUN apk add --no-cache git && \
|
2021-08-26 23:21:40 +00:00
|
|
|
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest && \
|
2021-01-17 01:45:50 +00:00
|
|
|
mkdir -p ${GOPATH}/src/git.minhas.io/asara && \
|
|
|
|
cd ${GOPATH}/src/git.minhas.io/asara && \
|
|
|
|
git clone https://git.minhas.io/asara/sudoscientist-go-backend && \
|
|
|
|
cd ${GOPATH}/src/git.minhas.io/asara/sudoscientist-go-backend && \
|
2022-03-26 22:05:38 +00:00
|
|
|
go mod init && go get && go build -o /go/bin/sudoscientist-go-backend main.go && \
|
2021-01-17 01:45:50 +00:00
|
|
|
mv /go/bin/* /usr/local/bin/ && \
|
|
|
|
rm -rf /go/src && \
|
|
|
|
apk del git
|
|
|
|
|
|
|
|
CMD ["/usr/local/bin/sudoscientist-go-backend"]
|