forked from krakend/krakend-ce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (26 loc) · 950 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
32
33
34
35
36
37
38
39
40
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 git
COPY . /app
WORKDIR /app
ARG TOKEN
ENV TOKEN=${TOKEN}
RUN make build
FROM alpine:${ALPINE_VERSION}
ARG git_commit=unspecified
LABEL git_commit="${git_commit}"
LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/FRINXio/krakend-ce"
RUN apk upgrade --no-cache --no-interactive && apk add --no-cache ca-certificates tzdata curl && \
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
COPY azure_plugin.so /usr/local/lib/krakend/azure_plugin.so
RUN chown -R krakend /etc/ssl/certs
USER krakend
COPY startup.sh /startup.sh
WORKDIR /etc/krakend
ENTRYPOINT [ "/startup.sh" ]
EXPOSE 8000 8090