Files
nextcloud/aio-container-tools
Pablo Zmdl a9c3daedb1 Fix wrong spelling
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
2026-03-24 20:15:06 +01:00
..
2026-03-24 20:11:34 +01:00
2026-03-24 20:11:34 +01:00
2026-03-24 20:15:06 +01:00

aio-container-tools

Standalone tools for Nextcloud AIO containers, for tasks that shouldn't be executed in a shell environment (e.g. due to string handling issues).

Golang was chosen because it doesn't require additional runtimes in the containers, and has a pretty easy syntax that is comprehensible even for people without much experience with the language.

The tools should be built in the container image build process, so they are built for the correct target platform in multi-arch builds. See below for an example.

Build process

To include the binary of aio-pg-healhcheck into your container image, include such a snippet into your Containerfile:

FROM docker.io/library/golang:alpine AS golang-builder

# hadolint ignore=DL3022
COPY --from=aio-container-tools . /tmp/aio-container-tools/
RUN cd /tmp/aio-container-tools \
 && go build -o /usr/local/bin/aio-pg-healthcheck ./cmd/aio-pg-healthcheck

FROM your-base-image
COPY --from=golang-builder /usr/local/bin/aio-pg-healthcheck /usr/local/bin/

To build it you now have to pass the aio-container-tools directory as additional, named build-context like this:

docker build \
  --build-context aio-container-tools=/path/to/all-in-one/aio-container-tools \
  .

Remote git variant (without local clone of this repo)

docker build \
  --build-context aio-container-tools="https://github.com/nextcloud-releases/all-in-one.git#main:aio-container-tools" \
  .