This commit is contained in:
hailin 2025-05-17 15:07:13 +08:00
parent 2b974295d0
commit db26b19cd7
1 changed files with 17 additions and 23 deletions

View File

@ -1,27 +1,21 @@
# syntax=docker/dockerfile:1.6
# #============================================ gotrue build======================================================
# FROM golang:1.22.3-alpine3.20 as authbuild
# ENV GO111MODULE=on
# ENV CGO_ENABLED=0
# ENV GOOS=linux
#============================================ gotrue build======================================================
FROM golang:1.22.3-alpine3.20 as authbuild
# RUN apk add --no-cache make git
RUN apk add --no-cache make git
# WORKDIR /go/src/github.com/supabase/auth
# # Pulling dependencies
# COPY auth_v2.169.0/Makefile auth_v2.169.0/go.* ./
# RUN make deps
# # Building stuff
# COPY auth_v2.169.0/. /go/src/github.com/supabase/auth
# # Make sure you change the RELEASE_VERSION value before publishing an image.
# RUN RELEASE_VERSION=unspecified make build
WORKDIR /go/src/github.com/supabase/auth
# Pulling dependencies
COPY auth_v2.169.0/Makefile auth_v2.169.0/go.* ./
RUN make deps
# Building stuff
COPY auth_v2.169.0/. /go/src/github.com/supabase/auth
# Make sure you change the RELEASE_VERSION value before publishing an image.
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux RELEASE_VERSION=unspecified make build
#============================================ postgres ====================================================
@ -267,13 +261,13 @@ COPY postgrest_v12.2.8/postgrest /usr/bin/postgrest
RUN chmod +x /usr/bin/postgrest
#=========================================== 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/*
# 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/
# RUN ln -s /usr/local/bin/auth /usr/local/bin/gotrue
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/migrations /usr/local/etc/auth/migrations/
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 ====================================================