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
1 changed files with 22 additions and 0 deletions

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=""
VOLUME /data
COPY --from=build /migrator/migrator /migrator
ENTRYPOINT ["/migrator"]