diff --git a/README.md b/README.md index dae50c3..27805a9 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ _Why use this project?_ You might want to try out inboard because it: ```sh docker pull ghcr.io/br3ndonland/inboard -docker run -d -p 80:80 ghcr.io/br3ndonland/inboard +docker run -d -p 80:80 --platform linux/amd64 ghcr.io/br3ndonland/inboard http :80 # HTTPie: https://httpie.io/ ``` diff --git a/cspell.json b/cspell.json index cbbb85e..3c67f7e 100644 --- a/cspell.json +++ b/cspell.json @@ -37,6 +37,7 @@ "codespace", "codespaces", "codium", + "containerd", "dependabot", "dockerfiles", "dotenv", @@ -61,6 +62,7 @@ "mypy", "ndonland", "noqa", + "opencontainers", "pipx", "postinstallation", "prereleases", diff --git a/docs/authentication.md b/docs/authentication.md index c3ce905..ed72928 100644 --- a/docs/authentication.md +++ b/docs/authentication.md @@ -57,7 +57,7 @@ Server: ```sh docker pull ghcr.io/br3ndonland/inboard -docker run -d -p 80:80 \ +docker run -d -p 80:80 --platform linux/amd64 \ -e "BASIC_AUTH_USERNAME=test_user" \ -e "BASIC_AUTH_PASSWORD=r4ndom_bUt_memorable" \ ghcr.io/br3ndonland/inboard diff --git a/docs/contributing.md b/docs/contributing.md index 94b57ea..7ae8bcc 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -149,7 +149,7 @@ docker build . --rm --target starlette -t localhost/br3ndonland/inboard:starlett # Run Docker container with Uvicorn and reloading cd inboard -docker run -d -p 80:80 \ +docker run -d -p 80:80 --platform linux/amd64 \ -e "BASIC_AUTH_USERNAME=test_user" \ -e "BASIC_AUTH_PASSWORD=r4ndom_bUt_memorable" \ -e "LOG_LEVEL=debug" \ @@ -157,7 +157,7 @@ docker run -d -p 80:80 \ -e "WITH_RELOAD=true" \ -v $(pwd)/inboard:/app/inboard localhost/br3ndonland/inboard:base -docker run -d -p 80:80 \ +docker run -d -p 80:80 --platform linux/amd64 \ -e "BASIC_AUTH_USERNAME=test_user" \ -e "BASIC_AUTH_PASSWORD=r4ndom_bUt_memorable" \ -e "LOG_LEVEL=debug" \ @@ -165,7 +165,7 @@ docker run -d -p 80:80 \ -e "WITH_RELOAD=true" \ -v $(pwd)/inboard:/app/inboard localhost/br3ndonland/inboard:fastapi -docker run -d -p 80:80 \ +docker run -d -p 80:80 --platform linux/amd64 \ -e "BASIC_AUTH_USERNAME=test_user" \ -e "BASIC_AUTH_PASSWORD=r4ndom_bUt_memorable" \ -e "LOG_LEVEL=debug" \ @@ -174,15 +174,15 @@ docker run -d -p 80:80 \ -v $(pwd)/inboard:/app/inboard localhost/br3ndonland/inboard:starlette # Run Docker container with Gunicorn and Uvicorn -docker run -d -p 80:80 \ +docker run -d -p 80:80 --platform linux/amd64 \ -e "BASIC_AUTH_USERNAME=test_user" \ -e "BASIC_AUTH_PASSWORD=r4ndom_bUt_memorable" \ localhost/br3ndonland/inboard:base -docker run -d -p 80:80 \ +docker run -d -p 80:80 --platform linux/amd64 \ -e "BASIC_AUTH_USERNAME=test_user" \ -e "BASIC_AUTH_PASSWORD=r4ndom_bUt_memorable" \ localhost/br3ndonland/inboard:fastapi -docker run -d -p 80:80 \ +docker run -d -p 80:80 --platform linux/amd64 \ -e "BASIC_AUTH_USERNAME=test_user" \ -e "BASIC_AUTH_PASSWORD=r4ndom_bUt_memorable" \ localhost/br3ndonland/inboard:starlette diff --git a/docs/docker.md b/docs/docker.md index 4cfe32d..cd5dd30 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -232,24 +232,28 @@ The image could then be built with: ```sh cd /path/to/repo -docker build . -t imagename:latest +docker build --platform linux/amd64 -t imagename:latest . ``` -The final argument is the Docker image name (`imagename` in this example). Replace with your image name. +Replace `imagename` with your image name. + +!!! info "Docker platforms" + + [Docker supports multiple platforms](https://docs.docker.com/build/building/multi-platform/) (combinations of operating system and CPU architecture) that can be supplied to the Docker CLI with the `--platform` argument. inboard currently only builds for the `linux/amd64` platform, also known as `x86_64`. See [containerd/platforms](https://github.com/containerd/platforms) and [opencontainers/image-spec](https://github.com/opencontainers/image-spec/blob/036563a4a268d7c08b51a08f05a02a0fe74c7268/specs-go/v1/descriptor.go#L52-L72) for more details on available platforms. ## Run containers Run container: ```sh -docker run -d -p 80:80 imagename +docker run -d -p 80:80 --platform linux/amd64 imagename ``` Run container with mounted volume and Uvicorn reloading for development: ```sh cd /path/to/repo -docker run -d -p 80:80 \ +docker run -d -p 80:80 --platform linux/amd64 \ -e "LOG_LEVEL=debug" -e "PROCESS_MANAGER=uvicorn" -e "WITH_RELOAD=true" \ -v $(pwd)/package:/app/package imagename ``` diff --git a/docs/index.md b/docs/index.md index 6d8203d..2fbac39 100644 --- a/docs/index.md +++ b/docs/index.md @@ -31,7 +31,7 @@ _Why use this project?_ You might want to try out inboard because it: ```sh docker pull ghcr.io/br3ndonland/inboard -docker run -d -p 80:80 ghcr.io/br3ndonland/inboard +docker run -d -p 80:80 --platform linux/amd64 ghcr.io/br3ndonland/inboard http :80 # HTTPie: https://httpie.io/ ```