-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- As environment variables are picked during build phase, we need to revert the dockerfile until we find a solution (it's better that the image takes 30 minutes to run that it doesn't work) - Build docker image for ARM64. That should make Apple computers run the image faster
- Loading branch information
Showing
3 changed files
with
51 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,21 @@ | ||
FROM node:18-alpine AS base | ||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
|
||
FROM base AS builder | ||
|
||
FROM node:18-alpine | ||
RUN apk add --no-cache libc6-compat git python3 py3-pip make g++ libusb-dev eudev-dev linux-headers | ||
WORKDIR /app | ||
|
||
# Install dependencies | ||
COPY package.json yarn.lock* ./ | ||
RUN yarn --frozen-lockfile | ||
COPY . . | ||
RUN yarn run after-install | ||
|
||
RUN yarn build | ||
|
||
# Production image | ||
FROM base AS runner | ||
WORKDIR /app | ||
# install deps | ||
RUN yarn install --frozen-lockfile | ||
RUN yarn after-install | ||
|
||
ENV NODE_ENV production | ||
ENV REVERSE_PROXY_UI_PORT 8080 | ||
|
||
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs | ||
COPY --from=builder /app/out ./out | ||
|
||
# Set the correct permission for prerender cache | ||
RUN mkdir .next && chown nextjs:nodejs .next | ||
# Next.js collects completely anonymous telemetry data about general usage. | ||
# Learn more here: https://nextjs.org/telemetry | ||
# Uncomment the following line in case you want to disable telemetry during the build. | ||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
|
||
USER nextjs | ||
EXPOSE 3000 | ||
|
||
EXPOSE ${REVERSE_PROXY_UI_PORT} | ||
ENV PORT 3000 | ||
|
||
CMD npx -y serve out -p ${REVERSE_PROXY_UI_PORT} | ||
CMD ["yarn", "static-serve"] |
This file was deleted.
Oops, something went wrong.