forked from supabase/auth
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
33 lines (24 loc) · 908 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
FROM golang:1.17-alpine as build
ENV GO111MODULE=on
ENV CGO_ENABLED=0
ENV GOOS=linux
RUN apk add --no-cache make git curl
WORKDIR /go/src/github.com/netlify/gotrue
# Pulling dependencies
COPY ./Makefile ./go.* ./
RUN make deps
# Building stuff
COPY . /go/src/github.com/netlify/gotrue
RUN make build
ARG KAIGARA_VERSION=v1.0.10
RUN curl -Lo ./kaigara https://github.com/openware/kaigara/releases/download/${KAIGARA_VERSION}/kaigara \
&& chmod +x ./kaigara
FROM alpine:3.15
RUN adduser -D -u 1000 netlify
RUN apk add --no-cache ca-certificates
COPY --from=build /go/src/github.com/netlify/gotrue/gotrue /usr/local/bin/gotrue
COPY --from=build /go/src/github.com/netlify/gotrue/kaigara /usr/local/bin/kaigara
COPY --from=build /go/src/github.com/netlify/gotrue/migrations /usr/local/etc/gotrue/migrations/
ENV GOTRUE_DB_MIGRATIONS_PATH /usr/local/etc/gotrue/migrations
USER netlify
CMD ["gotrue"]