Adding Dockerfile.
This commit is contained in:
parent
3f0c3f61c5
commit
19f386aafc
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
|||
FROM golang:1.13-alpine AS build
|
||||
|
||||
WORKDIR /migrator
|
||||
|
||||
RUN apk add --no-cache build-base curl git
|
||||
|
||||
ADD ./old /migrator/old
|
||||
ADD ./go.mod /migrator/go.mod
|
||||
ADD ./magnetico-migrator.go /migrator/magnetico-migrator.go
|
||||
|
||||
RUN go build "-ldflags=-s -w" -o /migrator/migrator .
|
||||
|
||||
FROM alpine:latest
|
||||
LABEL maintainer="skobkin-ru@ya.ru"
|
||||
|
||||
WORKDIR /
|
||||
|
||||
VOLUME /data
|
||||
|
||||
COPY --from=build /migrator/migrator /migrator
|
||||
|
||||
ENTRYPOINT ["/migrator"]
|
Reference in a new issue