This commit is contained in:
hailin 2025-05-17 14:59:05 +08:00
parent 0a7f71a37b
commit 2b974295d0
1 changed files with 20 additions and 20 deletions

View File

@ -1,24 +1,24 @@
# syntax=docker/dockerfile:1.6 # syntax=docker/dockerfile:1.6
#============================================ gotrue build====================================================== # #============================================ gotrue build======================================================
FROM golang:1.22.3-alpine3.20 as authbuild # FROM golang:1.22.3-alpine3.20 as authbuild
ENV GO111MODULE=on # ENV GO111MODULE=on
ENV CGO_ENABLED=0 # ENV CGO_ENABLED=0
ENV GOOS=linux # ENV GOOS=linux
RUN apk add --no-cache make git # RUN apk add --no-cache make git
WORKDIR /go/src/github.com/supabase/auth # WORKDIR /go/src/github.com/supabase/auth
# Pulling dependencies # # Pulling dependencies
COPY auth_v2.169.0/Makefile auth_v2.169.0/go.* ./ # COPY auth_v2.169.0/Makefile auth_v2.169.0/go.* ./
RUN make deps # RUN make deps
# Building stuff # # Building stuff
COPY auth_v2.169.0/. /go/src/github.com/supabase/auth # COPY auth_v2.169.0/. /go/src/github.com/supabase/auth
# Make sure you change the RELEASE_VERSION value before publishing an image. # # Make sure you change the RELEASE_VERSION value before publishing an image.
RUN RELEASE_VERSION=unspecified make build # RUN RELEASE_VERSION=unspecified make build
@ -267,13 +267,13 @@ COPY postgrest_v12.2.8/postgrest /usr/bin/postgrest
RUN chmod +x /usr/bin/postgrest RUN chmod +x /usr/bin/postgrest
#=========================================== goture include============================================== #=========================================== goture include==============================================
RUN useradd -m -u 1000 supabase # RUN useradd -m -u 1000 supabase
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/* # RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=authbuild /go/src/github.com/supabase/auth/auth /usr/local/bin/auth # COPY --from=authbuild /go/src/github.com/supabase/auth/auth /usr/local/bin/auth
COPY --from=authbuild /go/src/github.com/supabase/auth/migrations /usr/local/etc/auth/migrations/ # COPY --from=authbuild /go/src/github.com/supabase/auth/migrations /usr/local/etc/auth/migrations/
RUN ln -s /usr/local/bin/auth /usr/local/bin/gotrue # RUN ln -s /usr/local/bin/auth /usr/local/bin/gotrue
ENV GOTRUE_DB_MIGRATIONS_PATH=/usr/local/etc/auth/migrations # ENV GOTRUE_DB_MIGRATIONS_PATH=/usr/local/etc/auth/migrations
#========================================== storage-api ==================================================== #========================================== storage-api ====================================================