41 lines
No EOL
1.1 KiB
Docker
41 lines
No EOL
1.1 KiB
Docker
FROM --platform=linux/amd64 alpine:3.18 as base
|
|
|
|
FROM --platform=linux/amd64 base as download
|
|
|
|
WORKDIR /tmp
|
|
|
|
RUN apk add --no-cache unzip
|
|
|
|
RUN wget https://github.com/oven-sh/bun/releases/download/bun-v1.0.0/bun-linux-x64.zip
|
|
RUN unzip bun-linux-x64.zip
|
|
|
|
FROM --platform=linux/amd64 base as bun
|
|
|
|
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
|
|
RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk
|
|
RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-bin-2.35-r0.apk
|
|
RUN apk --no-cache --force-overwrite add glibc-2.35-r0.apk glibc-bin-2.35-r0.apk
|
|
|
|
RUN /usr/glibc-compat/bin/ldd /lib/ld-linux-x86-64.so.2
|
|
|
|
COPY --from=download /tmp/bun-linux-x64/bun /usr/local/bin
|
|
|
|
FROM --platform=linux/amd64 bun as app
|
|
|
|
WORKDIR /app
|
|
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
EXPOSE 3000
|
|
ENV PORT 3000
|
|
|
|
ARG SKIP_ENV_VALIDATION=1
|
|
|
|
# RUN apk add --no-cache libc6-compat openssl1.1-compat # gcompat
|
|
|
|
COPY . .
|
|
|
|
RUN bun install --frozen-lockfile
|
|
RUN bunx prisma generate
|
|
RUN bun run build
|
|
|
|
CMD ["bun", "run", "/app/.next/standalone/server.js"] |