Adding Dockerfile.

This commit is contained in:
Alexey Skobkin 2019-10-20 02:08:38 +03:00
parent 3f0c3f61c5
commit 19f386aafc
No known key found for this signature in database
GPG key ID: 5D5CEF6F221278E7

22
Dockerfile Normal file
View 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"]