2023-03-06 12:49:22 -05:00
|
|
|
FROM node:19-alpine
|
2023-03-06 10:15:07 -05:00
|
|
|
WORKDIR /api
|
|
|
|
|
# copy package.json into the container at /api
|
|
|
|
|
COPY package*.json /api/
|
|
|
|
|
# install dependencies
|
|
|
|
|
RUN npm install
|
|
|
|
|
# Copy the current directory contents into the container at /api
|
|
|
|
|
COPY . /api/
|
2023-03-06 10:28:37 -05:00
|
|
|
# Make port 3080 available to the world outside this container
|
|
|
|
|
EXPOSE 3080
|
2023-03-11 16:14:11 +08:00
|
|
|
# Expose the server to 0.0.0.0
|
|
|
|
|
ENV HOST=0.0.0.0
|
2023-03-06 10:15:07 -05:00
|
|
|
# Run the app when the container launches
|
2023-03-06 15:56:25 -05:00
|
|
|
CMD ["npm", "start"]
|
|
|
|
|
|
|
|
|
|
# docker build -t node-api .
|