initial commit 2
This commit is contained in:
23
Dockerfile.build
Normal file
23
Dockerfile.build
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM golang:1.9.2
|
||||
|
||||
# Install glide
|
||||
RUN curl https://glide.sh/get | sh
|
||||
|
||||
# Sets the arguments.
|
||||
ARG BIN_NAME
|
||||
ARG APP_NAME
|
||||
ARG WORKDIR=/go/src/bitbucket.org/nemt/${APP_NAME}
|
||||
|
||||
# Prepares the work directory.
|
||||
RUN mkdir -p ${WORKDIR}
|
||||
ADD . ${WORKDIR}
|
||||
WORKDIR ${WORKDIR}
|
||||
RUN rm -rf glide.lock
|
||||
RUN rm -rf vendor/
|
||||
|
||||
# Installs dependencies and builds app.
|
||||
RUN glide install -force
|
||||
RUN go build -o ${BIN_NAME} .
|
||||
|
||||
# Pauses the container.
|
||||
CMD read
|
||||
Reference in New Issue
Block a user