mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2025-12-11 23:50:04 +01:00
Simplify Makefile and docker usage (#24)
This commit is contained in:
parent
2b8b849626
commit
c2fc8b5441
5 changed files with 44 additions and 35 deletions
12
Dockerfile
12
Dockerfile
|
|
@ -18,13 +18,15 @@ RUN go get \
|
|||
github.com/kisielk/errcheck
|
||||
|
||||
# copy source files
|
||||
COPY . $GOPATH/src/github.com/amacneil/dbmate
|
||||
WORKDIR $GOPATH/src/github.com/amacneil/dbmate
|
||||
COPY . /go/src/github.com/amacneil/dbmate
|
||||
WORKDIR /go/src/github.com/amacneil/dbmate
|
||||
|
||||
# build
|
||||
RUN go build -ldflags '-s' -o /go/bin/dbmate ./cmd/dbmate
|
||||
RUN make install build
|
||||
|
||||
# runtime image
|
||||
FROM debian:stretch-slim
|
||||
COPY --from=build /go/bin/dbmate /usr/local/bin/dbmate
|
||||
ENTRYPOINT ["dbmate"]
|
||||
COPY --from=build /go/src/github.com/amacneil/dbmate/dist/dbmate-linux-amd64 \
|
||||
/usr/local/bin/dbmate
|
||||
WORKDIR /app
|
||||
ENTRYPOINT ["/usr/local/bin/dbmate"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue