Tasks
- Convert the current Dockerfile into a multistage build Dockerfile.
- Optimise Dockerfile for caching benefits.
docker build -t IMAGENAME:VERSION .
Example:
docker build -t fishertest-1:0.0.1 .
docker run -p 8000:8000 IMAGENAME:VERSION .
Example:
docker run -p 8000:8000 -t fishertest-1:0.0.1 .
Enter CTRL+C
to stop
Execute below curl
commands in terminals for querying the url endpoints.
curl localhost:8000
Result:
Hello world.
curl localhost:8000/go
Result:
Don't communicate by sharing memory, share memory by communicating.
curl localhost:8000/opt
Result:
Don't communicate by sharing memory, share memory by communicating.