forked from Azure/azch-captureorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (33 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
## Build stage
FROM golang:1.9.4 as builder
# Set the working directory to the app directory
WORKDIR /go/src/captureorderfd
# Install godeps
RUN go get -u -v github.com/astaxie/beego
RUN go get -u -v github.com/beego/bee
RUN go get -d github.com/Microsoft/ApplicationInsights-Go/appinsights
RUN go get -u -v gopkg.in/mgo.v2
RUN go get -u -v github.com/streadway/amqp
RUN go get -u -v pack.ag/amqp
RUN go get gopkg.in/matryer/try.v1
# Copy the application files
COPY . .
# Build stage
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o captureorderfd .
## App stage
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /go/src/captureorderfd .
# Define environment variables
# Challenge Logging
ENV TEAMNAME=team-azch
# Mongo/Cosmos
ENV MONGOHOST=
ENV MONGOUSER=
ENV MONGOPASSWORD=
# Expose the application on port 8080
EXPOSE 8080
# Set the entry point of the container to the bee command that runs the
# application and watches for changes
CMD ["./captureorderfd", "run"]