Skip to content

Commit

Permalink
Revert Slim Down Docker Image (#3707) (#3709)
Browse files Browse the repository at this point in the history
This reverts PR #3707 as the CI build appears to be failing. I will
investigate and try to make a follow up PR that fixes the issue.
  • Loading branch information
nlordell authored May 15, 2024
1 parent d4b77b4 commit b6f7ac2
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM node:18-alpine AS build

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
COPY . .
Expand All @@ -18,22 +17,8 @@ ENV NODE_ENV production
# Uncomment the following line in case you want to disable telemetry during the build.
ENV NEXT_TELEMETRY_DISABLED 1

RUN yarn build

FROM alpine

RUN apk add busybox-extras tini
WORKDIR /www
COPY --from=build /app/out /www

# Next.js automatically adds `.html` extensions to URLs, but static HTTP file
# servers don't generally do this. You can work around this by creating symbolic
# links from `my-page.html` to either `my-page/index.html` or `my-page`
# depending on whether or not a `my-page` directory exists.
RUN find /www -name '*.html' -exec sh -c 'f="{}"; b="${f%.*}"; [ -d "$b" ] && ln -s "$f" "$b/index.html" || ln -s "$f" "$b"' ';'

EXPOSE 3000

ENV PORT 3000

CMD ["tini", "--", "busybox-extras", "httpd", "-fvv", "-h", "/www", "-p", "0.0.0.0:3000"]
CMD ["yarn", "static-serve"]

0 comments on commit b6f7ac2

Please sign in to comment.