-
Notifications
You must be signed in to change notification settings - Fork 453
/
Dockerfile
31 lines (19 loc) · 703 Bytes
/
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
ARG GOLANG_VERSION
ARG ALPINE_VERSION
FROM golang:${GOLANG_VERSION}-alpine${ALPINE_VERSION} as builder
RUN apk --no-cache --virtual .build-deps add make gcc musl-dev binutils-gold
COPY . /app
WORKDIR /app
RUN make build
FROM alpine:${ALPINE_VERSION}
LABEL maintainer="[email protected]"
RUN apk upgrade --no-cache --no-interactive && apk add --no-cache ca-certificates tzdata && \
adduser -u 1000 -S -D -H krakend && \
mkdir /etc/krakend && \
echo '{ "version": 3 }' > /etc/krakend/krakend.json
COPY --from=builder /app/krakend /usr/bin/krakend
USER 1000
WORKDIR /etc/krakend
ENTRYPOINT [ "/usr/bin/krakend" ]
CMD [ "run", "-c", "/etc/krakend/krakend.json" ]
EXPOSE 8000 8090