forked from criteo-forks/espoke
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (21 loc) · 662 Bytes
/
Copy pathDockerfile
File metadata and controls
35 lines (21 loc) · 662 Bytes
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
FROM golang:1.13 AS builder
LABEL maintainer="nosql-team@criteo.com"
ENV SKIP_TEST=${SKIP_TEST:+true}
WORKDIR /app
# Cache depenencies first
COPY go.mod go.sum ./
RUN go mod download
# Copy the rest of the project
COPY . .
RUN mkdir bin ; cd bin ; \
CGO_ENABLED=0 GOOS=linux go build -gcflags "all=-N -l" ../
RUN [ -z "$SKIP_TEST" ] && rm -rf app/ && go test ./...
# Compile Delve debugger
# RUN go get -u github.com/go-delve/delve/cmd/dlv
FROM alpine:3.11
LABEL maintener="nosql-team@criteo.com"
COPY --from=builder /app/bin/ .
#COPY --from=builder /go/bin/dlv .
WORKDIR /
RUN apk add --no-cache libc6-compat
CMD ["/bin/sh", "-c", "./espoke"]