23 lines
421 B
Docker
23 lines
421 B
Docker
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"]
|