unregistry Docker & Self-Hosted Deployment

GitHub

Push docker images directly to remote servers without an external registry

4,744 stars Go Go 1 file ยท ~26,533 tokens #containerd#docker#golang#kubernetes#oci#registry
1. Pull Image (DOCKERHUB) docker pull psviderski/unregistry:latest
2. Docker Run (1-Click Launch) docker run -d --name unregistry -p 5000:5000 --restart always psviderski/unregistry:latest
3. Podman Run podman run -d --name unregistry -p 5000:5000 --restart always psviderski/unregistry:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/psviderski/unregistry:latest
5. ORAS Pull (OCI Artifact) oras pull psviderski/unregistry:latest
Dockerfile
ARG ALPINE_VERSION=3.22.0

# Cross-compile unregistry for multiple architectures to speed up the build process on GitHub Actions.
FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS builder
ARG TARGETOS
ARG TARGETARCH

WORKDIR /build

# Download and cache dependencies and only redownload them in subsequent builds if they change.
COPY go.mod go.sum ./
RUN go mod download && go mod verify

COPY . .
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o unregistry ./cmd/unregistry


# Create a minimal image with the static binary built in the builder stage.
FROM alpine:${ALPINE_VERSION}

COPY --from=builder /build/unregistry /usr/local/bin/

EXPOSE 5000
# Run as root user by default to allow access to the containerd socket. This in unfortunate as running as non-root user
# requires changing the containerd socket permissions which still can be manually done by advanced users.
ENTRYPOINT ["unregistry"]