From db26b19cd7ca012c35bb947bbc746f3dbbf3a6b4 Mon Sep 17 00:00:00 2001 From: hailin Date: Sat, 17 May 2025 15:07:13 +0800 Subject: [PATCH] . --- Dockerfile | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index 54478c6..a5edda1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 ==================================================== \ No newline at end of file