Skip to main content

Container

Retrieve API Key

Log in and retrieve an API key from https://app.airpipe.io/apikeys

Create a configs directory

Supply any number of configuration files in this directory, and then ensure they are targeted.

Your structure could look something similar as below:

├── configs
│ ├── infoAPI.yml
│ ├── accountsAPI.yml
│ ├── backupAPI.yml
│ └── service1.yml
└── Dockerfile

Adjust Dockerfile as appropriate

Use the below Dockerfile as a starting point.

Dockerfile
FROM alpine:latest

# Pin a specific version (docker build --build-arg AIRPIPE_VERSION=1.0.0 .)
# or leave empty to pull the latest at build time from download.airpipe.io.
ARG AIRPIPE_VERSION=""

ENV AIRPIPE_API_KEY="YOUR_API_KEY"

WORKDIR /app

RUN apk add --no-cache curl nano && \
VERSION="${AIRPIPE_VERSION:-$(curl -fsSL https://download.airpipe.io/latest.version)}" && \
ARCH=$(uname -m) && \
echo "Installing Air Pipe ${VERSION} for ${ARCH}" && \
if [ "$ARCH" = "x86_64" ]; then \
curl -o /app/agent "https://download.airpipe.io/${VERSION}/linux/x86_64/airpipe"; \
elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then \
curl -o /app/agent "https://download.airpipe.io/${VERSION}/linux/aarch64/airpipe"; \
else \
echo "Unsupported architecture: ${ARCH}" && exit 1; \
fi && \
chmod +x /app/agent

# UPDATE to your config directory
COPY configs /app/configs

LABEL org.opencontainers.image.title="airpipe" \
org.opencontainers.image.version="${AIRPIPE_VERSION:-latest}" \
org.opencontainers.image.source="https://download.airpipe.io"

# 4111 is the default http port used
EXPOSE 4111

CMD ["/app/agent", "server", "--config-dir", "configs/"]

Build Image

Name the image to something you prefer for your purpose.

By default Air Pipe runs on port 4111 you can adjust this if required.

The Dockerfile pulls the latest Air Pipe version at build time. To pin a specific version, pass a build arg (e.g. --build-arg AIRPIPE_VERSION=1.0.0).

docker build -t my-airpipe-image .

Pin a version:

docker build --build-arg AIRPIPE_VERSION=1.0.0 -t my-airpipe-image .

Running on Docker

docker run -d -p 4111:4111 my-airpipe-image