pokerogue/Dockerfile
Domagoj 65c72c65b9
[Dev] Add Podman support (#6150)
* Add Dockerfile

* Refactor for improved podman support

* Podman support + docs

* Update documentation for podman usage

* Update docs/podman.md with working podman run command

* Add package manager constraint to package.json and Dockerfile
Update podman.md docs

* Remove package manager constraints from github workflows per DayKev
Update podman.md docs with extra steps for locales and testing command
Remove missleading comment from Dockerfile

* Remove Dockerfile comment

* Re-add `pnpm` version to Github Pages workflow

* Mention podman in CONTRIBUTING.md
Fix typo in docs/podman.md test command

* Fix path to docs/podman.md

---------

Co-authored-by: Lugiad <adrien.grivel@hotmail.fr>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-09-10 14:23:13 -05:00

48 lines
1004 B
Docker

# syntax=docker/dockerfile:1
ARG NODE_VERSION=22.14
ARG OS=alpine
FROM node:${NODE_VERSION}-${OS}
# Create non-root user
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
# Install git (for potential runtime needs)
RUN apk add --no-cache git
# Set working directory
WORKDIR /app
# Enable and prepare pnpm
RUN corepack enable && corepack prepare pnpm@10.14.0 --activate
COPY . .
# Copy package files
COPY package.json pnpm-lock.yaml ./
# Install all dependencies
RUN --mount=type=cache,target=/home/appuser/.pnpm-store \
pnpm install --frozen-lockfile && \
rm -rf /home/appuser/.pnpm-store/*
# Change ownership
RUN chown -R appuser:appgroup /app
# Switch to non-root user
USER appuser
# Set environment variables
ENV VITE_BYPASS_LOGIN=1 \
VITE_BYPASS_TUTORIAL=0 \
NEXT_TELEMETRY_DISABLED=1 \
PNP_HOME=/home/appuser/.shrc \
NODE_ENV=development \
PORT=8000
# Expose port
EXPOSE $PORT
# Start the app in development mode
CMD ["pnpm", "run", "start:podman"]