Add documentation for docker image

This commit is contained in:
Felix Auringer
2021-04-27 13:44:32 +02:00
parent 2cb34eb477
commit be04fb5abd

View File

@ -8,7 +8,13 @@ The project can be compiled using `go build`. This should create a binary which
Alternatively, the `go run .` command can be used to automatically compile and run the project. Alternatively, the `go run .` command can be used to automatically compile and run the project.
To run the tests, use `go test`. To run the tests, use `go test ./...`.
### Docker
The CI builds a Docker image and pushes it to our Docker registry at `drp.codemoon.xopic.de`. In order to pull an image from the registry you have to login with `sudo docker login drp.codemoon.xopic.de`. Execute `sudo docker run -p 3000:3000 drp.codemoon.xopic.de/<image name>` to run the image locally. You can find the image name in the `dockerimage` CI job. You can then interact with the webserver on your local port 3000.
You can also build the Docker image locally by executing `docker build -t <image name> .` in the root directory of this project. It assumes that the Go binary is named `poseidon` and available in the project root (see [here](#setup)). You can then start a Docker container with `sudo docker run --rm -p 3000:3000 <image name>`.
### Linter ### Linter