22 lines
839 B
Text
22 lines
839 B
Text
|
FROM golang:alpine
|
||
|
|
||
|
# add ca-certificates package
|
||
|
RUN apk add --no-cache ca-certificates git && \
|
||
|
go get -u -d github.com/mattes/migrate/cli github.com/lib/pq && \
|
||
|
go build -tags 'postgres' -o ${GOPATH}/bin/migrate github.com/mattes/migrate/cli && \
|
||
|
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 && \
|
||
|
go get && go build main.go && \
|
||
|
mv /go/bin/* /usr/local/bin/ && \
|
||
|
rm -rf /go/src && \
|
||
|
apk del git
|
||
|
|
||
|
# Copy masked.name root cert
|
||
|
COPY files/MaskedName_Root_CA.crt /usr/local/share/ca-certificates/MaskedName_Root_CA.crt
|
||
|
|
||
|
# update ca certs
|
||
|
RUN update-ca-certificates 2>/dev/null
|
||
|
CMD ["/usr/local/bin/sudoscientist-go-backend"]
|