Skip to content

Add a Dockerfile to run with Docker #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Node modules (we'll install fresh in the image)
node_modules
npm-debug.log
yarn-error.log

# Logs
logs
*.log

# Environment files (optional for security)
.env
.env.*

# OS & editor junk
.DS_Store
Thumbs.db
*.swp
*.swo
.idea
.vscode

# Test coverage / build artifacts
coverage
dist
build
tmp
.cache

# Git
.git
.gitignore

# Dockerignore itself (not needed inside the image)
.dockerignore
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:23.11-slim AS builder
WORKDIR /app
RUN npm install -g typescript shx

COPY . ./
RUN --mount=type=cache,target=/root/.npm npm install

ENTRYPOINT ["node", "/app/dist/index.js"]