Add Dockerfile, .dockerignore
Took 1 hour 25 minutes
This commit is contained in:
parent
ab943146d3
commit
f9e91bd5a9
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@ -0,0 +1,4 @@
|
||||
*/templates
|
||||
*/types
|
||||
*/docs
|
||||
*/db
|
||||
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@ -0,0 +1,23 @@
|
||||
FROM golang:1.10-alpine AS builder
|
||||
|
||||
WORKDIR /go/src/github.com/crusttech/crust
|
||||
|
||||
ENV CGO_ENABLED=0
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN mkdir /build; \
|
||||
find cmd -type d -mindepth 1 -maxdepth 1 | while read CMDPATH; do \
|
||||
go build -o /build/$(basename ${CMDPATH}) ${CMDPATH}/*.go; \
|
||||
done;
|
||||
|
||||
FROM alpine:3.7
|
||||
|
||||
ENV PATH="/crust:{$PATH}"
|
||||
WORKDIR /crust
|
||||
|
||||
# @todo copy crm/types, migrations
|
||||
|
||||
COPY --from=builder ./build/* /crust/
|
||||
|
||||
CMD ["/bin/echo", "Run of the crust commands: sam, crm"]
|
||||
Loading…
x
Reference in New Issue
Block a user