https://github.com/drsnowbird/nodejs-app-docker
NodeJS Application Dockerizing Docker
https://github.com/drsnowbird/nodejs-app-docker
dockerization nodejs
Last synced: about 1 year ago
JSON representation
NodeJS Application Dockerizing Docker
- Host: GitHub
- URL: https://github.com/drsnowbird/nodejs-app-docker
- Owner: DrSnowbird
- License: apache-2.0
- Created: 2018-08-05T19:26:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-19T06:16:53.000Z (about 7 years ago)
- Last Synced: 2025-01-13T16:49:41.946Z (about 1 year ago)
- Topics: dockerization, nodejs
- Language: Shell
- Size: 14.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nodejs Application development Utility Docker Container
To provide a Docker skeleton for dockerizing NodeJS application
# How to use?
* 1.) Create new NodeJS "./app" directory
The "./app" directory will be your NodeJS app directory.
```
mkdir ./app
```
* 2.) Build your NodeJS image
```
./build.sh
```
* 3.) Run your NodeJS container
```
./run.sh
```
# Example
```
mkdir ./app
cp -r ./example/* ./app/
./build.sh
./run.sh
```
Once start, you can access the NodeJS Web app
```
curl -i http://127.0.0.1:38080
```
# Configuration
You can change the host port when using "./run.sh" as the following show how to define the mapping between host port and NodeJS container's internal port. Note that the "#" is mandatory and no space behind either for "#PORTS_LIST ..."
```
#### ---- NodeJS Dockerizing Docker ----
#PORTS_LIST="38080:8080"
```
## References & Resources
* [Docker ARG and ENV Guide](https://vsupalov.com/docker-arg-env-variable-guide/)