RustTraining Docker & Self-Hosted Deployment

GitHub

Beginner, advanced, expert level Rust training material

14,945 stars Rust Rust 1 file ยท ~2,253 tokens
RAW Compose
1. Pull Image (DOCKERHUB) docker pull library/rust-training
2. Docker Run (1-Click Launch) docker run -d --name rusttraining -p 3000:3000 --restart always rust-training:local
3. Podman Run podman run -d --name rusttraining -p 3000:3000 --restart always rust-training:local
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/library/rust-training:local
5. ORAS Pull (OCI Artifact) oras pull rust-training:local
6. Compose Deployment docker compose up -d
docker/compose.yaml
Download .yml
name: rust-training

services:
  books:
    build:
      # Context is the repo root: the build needs the book sources and the
      # xtask crate, which live above this file.
      context: ..
      dockerfile: docker/Dockerfile
    image: rust-training:local
    container_name: rust-training-books

    # Host port is configurable; the container always listens on 8080 because
    # nginx-unprivileged runs as a non-root user.
    ports:
      - "${PORT:-3000}:8080"

    restart: unless-stopped

    security_opt:
      - no-new-privileges:true

    healthcheck:
      test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:8080/"]
      interval: 30s
      timeout: 5s
      start_period: 5s
      retries: 3