Commit 71529776 authored by Sébastien Moretti's avatar Sébastien Moretti
Browse files

Add running container doc

parent 33eb1ccc
......@@ -33,20 +33,3 @@ docker kill <CONTAINER ID>
# Scan container vulnerabilities
docker scan --file Dockerfile --exclude-base ucnebase:$UCNEBASE_VERSION
# Run the container with default -> MySQL and Apache running
docker run -p 8081:8081 -d ucnebase:$UCNEBASE_VERSION
- -p Publish a container's port(s) to the host, i.e. map internal port 8081 to 8081 externally
- -d Run container in background and print container ID
# Run bash in the Docker image
docker run --rm -i -t ucnebase:$UCNEBASE_VERSION bash
# Mounting/binding a local repository (,readonly can be added to force readonly mounting)
--mount type=bind,source=/software,target=/software
- UCNEBASE_VERSION is the container version
- --name assignes a name to the running container
- --rm automatically removes the container when it exits
- -i opens an interactive session with the container
- -t allocates a pseudo-TTY
```bash
export UCNEBASE_VERSION=0.0.2
```
# Run the container with default -> MySQL and Apache running
````bash
docker run -p 8081:8081 -d ucnebase:$UCNEBASE_VERSION
```
- -p Publish a container's port(s) to the host, i.e. map internal port 8081 to 8081 externally
- -d Run container in background and print container ID
# Run bash in the Docker image
````bash
docker run --rm -i -t ucnebase:$UCNEBASE_VERSION bash
```
# Mounting/binding a local repository (,readonly can be added to force readonly mounting)
````bash
--mount type=bind,source=/software,target=/software
```
- UCNEBASE_VERSION is the container version
- --name assignes a name to the running container
- --rm automatically removes the container when it exits
- -i opens an interactive session with the container
- -t allocates a pseudo-TTY
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment