mirror of
https://github.com/autistic-symposium/backend-and-orchestration-toolkit.git
synced 2025-06-08 15:02:55 -04:00
44 lines
No EOL
616 B
Markdown
Executable file
44 lines
No EOL
616 B
Markdown
Executable file
# Spinning up a Hello World node server in docker
|
|
|
|
Build the image:
|
|
|
|
```
|
|
$ make build:
|
|
```
|
|
|
|
Run the container:
|
|
|
|
```
|
|
$ make run
|
|
```
|
|
docker build -t node_app_test .
|
|
|
|
Check whether the server worked:
|
|
```
|
|
$ make curl
|
|
```
|
|
|
|
Check container's status:
|
|
```
|
|
$ make status
|
|
```
|
|
|
|
|
|
#### Other useful commands
|
|
|
|
Exec inside the container:
|
|
|
|
```
|
|
$ docker exec -i -t <container name from status> /bin/bash
|
|
```
|
|
|
|
Check images in disk:
|
|
|
|
```
|
|
$ docker images
|
|
```
|
|
|
|
|
|
## Some References:
|
|
|
|
* [Dockerfiles good practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#general-guidelines-and-recommendations). |