https://github.com/astechedu/sample-dockerized-express-app
This is sample dockerized node express app.
https://github.com/astechedu/sample-dockerized-express-app
docker dockerfile dockerized-express javascript node node-express
Last synced: 3 months ago
JSON representation
This is sample dockerized node express app.
- Host: GitHub
- URL: https://github.com/astechedu/sample-dockerized-express-app
- Owner: astechedu
- Created: 2022-12-30T12:08:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-30T12:41:55.000Z (over 2 years ago)
- Last Synced: 2025-01-17T16:56:47.807Z (5 months ago)
- Topics: docker, dockerfile, dockerized-express, javascript, node, node-express
- Language: Dockerfile
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sample-dockerized-express-app
This is sample dockerized node express app.
Dockerfile:
#Fetching the latest node image on alpine linux
FROM node:18-alpine
#Declaring env#ENV NODE_ENV development
#Setting up the work directory
WORKDIR /express-app
#Installing dependencies
COPY ./package.json /express-app
RUN npm install#Copying all the files in our project
COPY . .
#Starting our application
CMD ["node","app.js"]
----- X -------
#Building image
docker build . -t dockerized_express
#Running container
docker run --name express-app -p 8080:3000 -d dockerized_express
#On Browser
http://localhost:8080