32 lines
735 B
Text
32 lines
735 B
Text
|
FROM golang:1.10.3-alpine
|
||
|
|
||
|
# Update packages and install dependency packages for services
|
||
|
RUN apk update && apk add --no-cache bash git
|
||
|
|
||
|
EXPOSE 8080
|
||
|
EXPOSE 8181
|
||
|
|
||
|
# Disables C compilation
|
||
|
ENV CGO_ENABLED=0
|
||
|
|
||
|
# Change working directory
|
||
|
WORKDIR $GOPATH/src/myappziugv/
|
||
|
|
||
|
# Install dependencies
|
||
|
RUN go get -u github.com/golang/dep/...
|
||
|
RUN go get -u github.com/derekparker/delve/cmd/dlv/...
|
||
|
COPY . ./
|
||
|
RUN dep ensure -v
|
||
|
|
||
|
COPY run-dev $GOPATH/bin
|
||
|
RUN chmod 777 $GOPATH/bin/run-dev
|
||
|
RUN chmod 777 $GOPATH/src/myappziugv/
|
||
|
|
||
|
CMD ["/bin/bash"]
|
||
|
|
||
|
ARG bx_dev_user=root
|
||
|
ARG bx_dev_userid=1000
|
||
|
RUN BX_DEV_USER=$bx_dev_user
|
||
|
RUN BX_DEV_USERID=$bx_dev_userid
|
||
|
RUN if [ "$bx_dev_user" != root ]; then adduser -D -s /bin/bash -u $bx_dev_userid $bx_dev_user; fi
|