Skip to content

Commit

Permalink
chore: add Dockerfile for the map-selector
Browse files Browse the repository at this point in the history
  • Loading branch information
luandro committed Nov 2, 2024
1 parent 50e4df7 commit 74b375c
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# syntax = docker/dockerfile:1

# Use Node.js base image
FROM node:20-slim as base

LABEL fly_launch_runtime="Node.js"

# App lives here
WORKDIR /app

# Set production environment
ENV NODE_ENV="production"


# Throw-away build stage to reduce size of final image
FROM base as build

# Install packages needed to build node modules
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config python-is-python3

# Install node modules
COPY package-lock.json package.json ./
RUN npm install --ignore-scripts

# Copy application code
COPY . .


# Final stage for app image
FROM base

# Copy built application
COPY --from=build /app /app

# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD [ "node", "./map-selector/index.js" ]

0 comments on commit 74b375c

Please sign in to comment.