Files
Patrick Meade 677e13353f Adds Dockerfile and Utility Scripts (#31446)
* Adds Dockerfile and Utility Scripts

* Remove RUSTG_VERSION from _build_dependencies.sh

* Moved documentation to references, added link to mkdocs.yml

* Update references, finish documentation, fix typos

* Fixed small error in docs and scripts

* Add CI action to build and publish game server images

* Bump CI action to compatible Ubuntu runner

* Fix up the base image for NanoMap rendering

* Remove commented out base for nanomap-build stage

* Removed default values from Dockerfile build arguments

Sanitized default arguments in Dockerfile
Updated CI workflow to use _build_dependencies.sh to build the Docker image
Added documentation on using --build-arg flags with the docker build command

* Modify caching for Docker builds in CI

* Add missing files to pacify Nanomap Renderer
2026-04-11 22:13:20 +00:00

34 lines
1005 B
Python
Executable File

#!/usr/bin/env bash
# build
# Build a Docker image for Paradise
set -euo pipefail
SERVER_IMAGE="paradise:latest"
# make sure we're at the root of the repository
if [ ! -f "Dockerfile" ]; then
echo >&2 "Error: No Dockerfile found. Are you at the repository root?"
exit 1
fi
# determine which versions to use in order to build everything
source _build_dependencies.sh
# build the docker image
docker build "$@" \
--build-arg "NODE_VERSION=${NODE_VERSION}" \
--build-arg "RUST_VERSION=${RUST_VERSION}" \
--build-arg "STABLE_BYOND_MAJOR=${STABLE_BYOND_MAJOR}" \
--build-arg "STABLE_BYOND_MINOR=${STABLE_BYOND_MINOR}" \
--tag "${SERVER_IMAGE}" \
.
## uncomment to also tag the current git commit hash (short)
# GIT_HASH_TAG="$(git rev-parse --short=12 HEAD)"
# docker image tag paradise:latest paradise:${GIT_HASH_TAG}
## uncomment to also tag the current timestamp
# ISO8601_TAG="$(date --utc +%Y%m%dT%H%M%SZ)"
# docker image tag paradise:latest paradise:${ISO8601_TAG}