Skip to content

Add Dockerfile #446

@monolithed

Description

@monolithed
# Stage 1: builder
FROM node:20-alpine AS builder

RUN apk add --no-cache git bash curl
WORKDIR /app
ENV HUSKY=0

COPY . .

RUN corepack enable && corepack prepare yarn@1 --activate
RUN yarn install --frozen-lockfile
RUN yarn build

# Stage 2: prod
FROM node:20-alpine
WORKDIR /app

RUN apk add --no-cache nodejs npm

COPY --from=builder /app/dist ./dist
COPY --from=builder /app/index.html ./index.html
COPY --from=builder /app/ui.js ./ui.js
COPY --from=builder /app/sw.js ./sw.js
COPY --from=builder /app/ruffle ./ruffle

EXPOSE 9990

CMD ["npx", "serve", "-l", "9990", "--cors"]

It would be awesome if you could push the image to Docker Hub. Here's mine https://hub.docker.com/r/monolithed/replaywebpage

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions