mma-ask-app/README.md

40 lines
1.1 KiB
Markdown
Raw Normal View History

2020-01-27 01:41:23 +00:00
# Build docker image
% cd <app source directory>
% docker build --tag mahesh/mma-ask-app .
# Run docker container
% docker run --publish 49330:3000 --detach
# Manage docker containers
* List running containers
2020-01-27 01:44:18 +00:00
```
2020-01-27 01:41:23 +00:00
% docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d511b20c73d6 mahesh/mma-ask-app "docker-entrypoint.s…" 8 minutes ago Up 8 minutes 0.0.0.0:49330->3000/tcp upbeat_lederberg
2020-01-27 01:44:18 +00:00
```
2020-01-27 01:41:23 +00:00
* List all docker containrs
2020-01-27 01:44:18 +00:00
```
2020-01-27 01:41:23 +00:00
% docker ps --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d511b20c73d6 mahesh/mma-ask-app "docker-entrypoint.s…" 12 minutes ago Exited (137) 3 minutes ago upbeat_lederberg
% docker ps --all --quiet
d511b20c73d6
2020-01-27 01:44:18 +00:00
```
2020-01-27 01:41:23 +00:00
* Stop a running container
2020-01-27 01:44:18 +00:00
```
2020-01-27 01:41:23 +00:00
% docker stop d511b20c73d6
2020-01-27 01:44:18 +00:00
```
2020-01-27 01:41:23 +00:00
* Remove a container
2020-01-27 01:44:18 +00:00
```
2020-01-27 01:41:23 +00:00
% docker rm d511b20c73d6
2020-01-27 01:44:18 +00:00
```