Update file architecture to make go install work

This commit is contained in:
Brendan LE GLAUNEC
2017-10-12 17:02:10 +02:00
committed by Brendan Le Glaunec
parent 34994e615a
commit 82e36e1fd3
5 changed files with 40 additions and 16 deletions
+5 -6
View File
@@ -2,7 +2,7 @@
FROM golang:alpine AS build-env
COPY . /go/src/github.com/EtixLabs/cameradar
WORKDIR /go/src/github.com/EtixLabs/cameradar/cameraccess
WORKDIR /go/src/github.com/EtixLabs/cameradar/cameradar
RUN apk update && \
apk upgrade && \
@@ -13,9 +13,8 @@ RUN apk update && \
git \
pkgconfig
RUN curl https://glide.sh/get | sh
RUN glide install
RUN go build -o cameraccess
RUN curl https://glide.sh/get | sh && glide install
RUN go build -o cameradar
# Final stage
FROM alpine
@@ -23,6 +22,6 @@ FROM alpine
RUN apk --update add --no-cache nmap nmap-nselibs nmap-scripts \
curl-dev
WORKDIR /app/cameraccess
WORKDIR /app/cameradar
COPY --from=build-env /go/src/github.com/EtixLabs/cameradar/ /app/
ENTRYPOINT ["/app/cameraccess/cameraccess"]
ENTRYPOINT ["/app/cameradar/cameradar"]