-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.dev
36 lines (25 loc) · 993 Bytes
/
Dockerfile.dev
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
FROM golang:1.22.6
ARG SERVICE_NAME
WORKDIR /${SERVICE_NAME}
# -- install 3rd-party
ARG TARGETOS TARGETARCH
# air
RUN --mount=target=. --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOOS=$TARGETOS GOARCH=$TARGETARCH go install github.com/cosmtrek/[email protected]
RUN apt-get update && apt-get install -y \
gcc \
make \
gettext \
jq \
&& rm -rf /var/lib/apt/lists/*
RUN git clone -b v2.7.0 https://github.com/krakendio/krakend-ce.git /krakend && cd /krakend && make build && cp krakend /usr/bin
# -- set up Go
RUN chown -R nobody:nogroup /go
ENV GOCACHE /go/.cache/go-build
ENV GOENV /go/.config/go/env
RUN mkdir -p /usr/local/lib/krakend/plugins && chmod 777 /usr/local/lib/krakend/plugins
RUN mkdir -p /instill && chmod 777 /instill
USER nobody
WORKDIR /tmp
RUN git clone -b v2.0.12 https://github.com/lestrrat-go/jwx.git && cd jwx && make jwx && cd .. && rm -r jwx
WORKDIR /${SERVICE_NAME}
ENTRYPOINT ["tail", "-f", "/dev/null"]