mirror of
https://github.com/actix/examples
synced 2024-11-27 16:02:57 +01:00
23 lines
325 B
Markdown
23 lines
325 B
Markdown
# Docker sample
|
|
|
|
## Build image
|
|
|
|
```shell
|
|
docker build -t actix-docker .
|
|
```
|
|
|
|
## Run built image
|
|
|
|
```shell
|
|
docker run -d -p 8080:8080 actix-docker
|
|
# and the server should start instantly
|
|
curl http://localhost:8080
|
|
```
|
|
|
|
## Running unit tests
|
|
|
|
```shell
|
|
docker build -t actix-docker:test .
|
|
docker run --rm actix-docker:test
|
|
```
|