colyseusTest / Dockerfile
Kano001's picture
Update Dockerfile
38222b6 verified
raw
history blame contribute delete
576 Bytes
# Step 1: Use the official Node.js image as the base image
FROM node:18-alpine
# Step 2: Set the working directory inside the container
WORKDIR /app
# Step 3: Copy package.json and package-lock.json (if available) into the working directory
COPY package*.json ./
# Step 4: Install the dependencies
RUN npm install
# Step 5: Copy the rest of the application code into the working directory
COPY . .
# Step 6: Build the TypeScript code
RUN npm run build
# Step 7: Expose the port the server will run on
EXPOSE 7860
# Step 8: Start the Colyseus server
CMD ["npm", "start"]