### Composer Installation Output Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/getting-started/php.md Example output showing the successful installation of the `minicli/minicli` package via Composer. ```shell Installing dependencies from lock file Verifying lock file contents can be installed on current platform. Package operations: 1 install, 0 updates, 0 removals - Downloading minicli/minicli (4.2.0) - Installing minicli/minicli (4.2.0): Extracting archive Generating autoload files 1 package you are using is looking for funding. Use the `composer fund` command to find out more! ``` -------------------------------- ### Example wolfictl Version Output Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/staying-secure/security-advisories/managing-advisories/index.md This is an example of the output you should see after successfully installing and running `wolfictl version`. The exact details will vary. ```text __ __ ___ _ _____ ___ ____ _____ _ \ \ / / / _ \ | | | ___| |_ _| / ___| |_ _| | | \ \ /\ / / | | | | | | | |_ | | | | | | | | \ V V / | |_| | | |___ | _| | | | |___ | | | |___ \_\_/ \___/ |_____| |_| |___| \____| |_| |_____| wolfictl: A CLI helper for developing Wolfi GitVersion: devel GitCommit: 6c98dc69a559192575d085d87fd916d8281dd67d GitTreeState: clean BuildDate: 2024-07-23T01:57:17 GoVersion: go1.22.5 Compiler: gc Platform: darwin/arm64 ``` -------------------------------- ### Example Tagging for Chainguard Containers Source: https://github.com/chainguard-dev/edu/blob/main/TAG_GUIDELINES.md Demonstrates how to apply tags for Chainguard Containers in a Getting Started guide. ```yaml tags: ["Chainguard Containers", "Getting Started", "Overview"] ``` -------------------------------- ### Navigate to Example Directory Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/how-to-use/dev-containers/index.md Change the current directory to the Go dev container example. ```shell cd edu-images-demos/chainguard-go-devcontainer ``` -------------------------------- ### Install Grype Binary using Installation Script Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/staying-secure/working-with-scanners/grype-tutorial/index.md Installs the Grype binary to a specified location on your system path using the official installation script. Change the path after -b to your preferred location. ```bash curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin ``` -------------------------------- ### RabbitMQ Image Testing Example Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/factory/assemble.md Demonstrates the process of running tests against a Docker image, specifically using RabbitMQ as an example. This involves starting the container and executing its internal tests. ```bash docker run -d --name rabbitmq rabbitmq:latest # ... run rabbitmq tests ... docker stop rabbitmq docker rm rabbitmq ``` -------------------------------- ### Alternative QEMU Emulation Setup with binfmt Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/build-tools/melange/troubleshooting.md An alternative method to enable multi-architecture QEMU user-space emulation by installing all binfmt handlers within a privileged Docker container. ```shell docker run --privileged --rm tonistiigi/binfmt --install all ``` -------------------------------- ### Install Syft using Installation Script Source: https://github.com/chainguard-dev/edu/blob/main/layouts/shortcodes/blurb/install_syft.md Download and run the official installation script to install Syft. Ensure you inspect the script before execution. Elevated permissions may be required. ```shell curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | \ sh -s -- -b /usr/local/bin ``` -------------------------------- ### Check Go Installation Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/sigstore/cosign/how-to-install-cosign.md Verify that Go is installed and meets the minimum version requirement before proceeding with Cosign installation. ```sh go version ``` ```output go version go1.25.4 linux/amd64 ``` -------------------------------- ### Wolfi Container Session Example Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/wolfi/overview.md Demonstrates a typical session within a Wolfi container, including checking OS release information, updating the package index, and installing a new package (curl). ```sh docker run -it cgr.dev/chainguard/wolfi-base ce557598406a:/# cat /etc/os-release ID=wolfi NAME="Wolfi" PRETTY_NAME="Wolfi" VERSION_ID="20230201" HOME_URL="https://wolfi.dev" ce557598406a:/# apk update fetch https://packages.wolfi.dev/os/aarch64/APKINDEX.tar.gz [https://packages.wolfi.dev/os] OK: 15046 distinct packages available ce557598406a:/# curl /bin/sh: curl: not found ce557598406a:/# apk add curl (1/5) Installing libbrotlicommon1 (1.0.9-r3) (2/5) Installing libbrotlidec1 (1.0.9-r3) (3/5) Installing libnghttp2-14 (1.55.1-r0) (4/5) Installing libcurl-openssl4 (8.2.1-r0) (5/5) Installing curl (8.2.1-r0) OK: 13 MiB in 19 packages ce557598406a:/# curl google.com ... ``` -------------------------------- ### Install Trivy with Installation Script Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/staying-secure/working-with-scanners/trivy-tutorial/index.md Installs Trivy using a provided script. Specify the desired installation location with the -b flag. You may need to use sudo for elevated permissions. ```shell curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.52.2 ``` ```shell curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b /usr/local/bin v0.52.2 ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/libraries/python/build-configuration.md Triggers a new download and installation of all project dependencies as defined in your configuration. ```shell poetry install ``` -------------------------------- ### Install a Chainguard Skill Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/agent-skills/public-catalog.md Use the `chainctl skills install` command to download and install a skill. This command automatically detects agents on your machine and places the skill in their relevant directories. ```shell chainctl skills install skills.cgr.dev/chainguard/github/add-educational-comments:latest ``` -------------------------------- ### Example dfc Version Output Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/migration/dockerfile-conversion.md This is an example of the output you should expect when verifying the dfc installation, showing the installed version. ```shell dfc version v0.9.3 ``` -------------------------------- ### Initialize Minimal Bun Example Project Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/libraries/javascript/build-configuration.md Commands to create a new directory, navigate into it, and initialize a new Bun project with `bun init -y`. ```shell mkdir bun-example cd bun-example bun init -y ``` -------------------------------- ### Install chainctl with Scoop Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainctl-usage/how-to-install-chainctl.md Install the chainctl command-line tool from the main Scoop bucket. ```shell scoop install main/chainctl ``` -------------------------------- ### Start MariaDB Service and Secure Installation on macOS Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/sigstore/rekor/install-a-rekor-instance.md Starts the MariaDB service using Homebrew and then runs the secure installation script on macOS. ```bash brew services start mariadb && sudo mysql_secure_installation ``` -------------------------------- ### Build or Start Development Server Source: https://github.com/chainguard-dev/edu/blob/main/README-PACKAGE-MAPPINGS.md Commands to build the static site or start a local development server for live preview. These are essential steps after fetching data or making content changes. ```bash npm run build ``` ```bash # or for development server: npm run start ``` -------------------------------- ### Example Output of Skill Installation Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/agent-skills/public-catalog.md This output shows the results of installing a skill on a machine where Claude Code is present, indicating the agent, its location, and the mode of installation (symlink). ```output Installing github/add-educational-comments AGENT | LOCATION | MODE -------------|-----------------------------------------------------------|--------------------------------------------------------------------------- Claude Code | .claude/skills/chainguard-github-add-educational-comments | symlink → ../../.agents/skills/chainguard-github-add-educational-comments ``` -------------------------------- ### Verify GET Request Response Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/getting-started/node.md Example output from a GET request, showing the JSON payload that was saved by the POST request. ```json {"code":"success","meta":{"total":1,"count":1},"payload":[{"msg":"testing","id":"f427f835-3e93-43ad-91c8-d150dffba0f9","createDate":"2023-02-07T14:48:54.256Z"}]} ``` -------------------------------- ### Example Build List Output Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/features/ca-docs/custom-assembly-chainctl.md This is an example of the output from the `chainctl image repo build list` command, showing build times, results, and tags. ```text START TIME | COMPLETION TIME | RESULT | TAGS --------------------------------+-------------------------------+---------+--------------------------------------------- Thu, 01 May 2025 10:10:40 PDT | Thu, 01 May 2025 10:10:45 PDT | Success | 20, 20.19, 20.19.1 Thu, 01 May 2025 10:10:34 PDT | Thu, 01 May 2025 10:10:46 PDT | Success | 22-slim, 22.15-slim, 22.15.0-slim Thu, 01 May 2025 10:10:33 PDT | Thu, 01 May 2025 10:10:41 PDT | Success | 23, 23.11, 23.11.0, latest . . . ``` -------------------------------- ### Create Project Directory Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/tooling/building-go-containers-with-ko.md Set up a new directory for your Go project. This command initializes the workspace for the Ko demo application. ```shell mkdir ko-demo && cd ko-demo ``` -------------------------------- ### Create Demo Directory and Navigate Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/getting-started/c/index.md Creates a directory for demo files and changes the current directory to it. Use this to organize your project files. ```sh mkdir -p ~/cguide && cd ~/cguide ``` -------------------------------- ### Output of APK Add 'mongo' Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/features/ca-docs/custom-assembly.md Example output after installing the 'mongo' package, showing the progress and the total size of installed packages. ```output (1/1) Installing mongo-8.0 (8.0.4-r1) Executing busybox-1.37.0-r0.trigger OK: 719 MiB in 78 packages ``` -------------------------------- ### Install Rekor Server from Source Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/sigstore/rekor/install-a-rekor-instance.md Installs the Rekor server and its CLI tool from source using Go. Ensure you are in the Rekor project directory. ```bash go install ./cmd/rekor-cli ./cmd/rekor-server ``` -------------------------------- ### Install Spell Checker and Enable Hooks Source: https://github.com/chainguard-dev/edu/blob/main/README.md Installs the aspell spell checker and enables the pre-commit hooks. This is a one-time setup process. ```sh # Install spell checker brew install aspell # Enable hooks ./setup-hooks.sh ``` -------------------------------- ### Trillian Log Signer Output Example Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/sigstore/rekor/install-a-rekor-instance.md Example output indicating the Trillian log signer has started. This output is informational and confirms the signer is operational. ```text I0629 18:13:42.226319 8513 main.go:98] **** Log Signer Starting **** W0629 18:13:42.227281 8513 main.go:129] **** Acting as master for all logs **** ... ``` -------------------------------- ### Trillian Log Server Output Example Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/sigstore/rekor/install-a-rekor-instance.md Example output indicating the Trillian log server has started successfully. This output is informational and does not require user interaction. ```text I0629 18:11:27.222341 7395 quota_provider.go:46] Using MySQL QuotaManager I0629 18:11:27.222847 7395 main.go:141] HTTP server starting on localhost:8090 I0629 18:11:27.222851 7395 main.go:180] RPC server starting on localhost:8091 I0629 18:11:27.223757 7395 main.go:188] Deleted tree GC started ``` -------------------------------- ### Initialize Catalog Starter Account Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/self-serve/overview.md Use this command to sign up for a new account with the Catalog Starter plan. It initiates an interactive process to select an authentication provider. ```shell chainctl starter init ``` -------------------------------- ### Create Minimal pnpm Example Project Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/libraries/javascript/build-configuration.md Initialize a new pnpm project and set up basic configuration for using Chainguard Libraries. ```shell mkdir pnpm-example cd pnpm-example pnpm init ``` -------------------------------- ### Example Bazel Build Output Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/features/packages/private-apk-repos/index.md Observe the build output to confirm that packages were successfully installed from the private APK repository. This output indicates the successful installation of the 'wget' package. ```output INFO: Analyzed target //:my_image (123 packages loaded, 656 targets configured). INFO: From Action my_image: 2026/03/12 12:46:27 INFO installing wolfi-baselayout (20230201-r28) arch=x86_64 2026/03/12 12:46:27 INFO installing ca-certificates-bundle (20251003-r4) arch=x86_64 2026/03/12 12:46:27 INFO installing ld-linux (2.43-r2) arch=x86_64 2026/03/12 12:46:27 INFO installing glibc (2.43-r2) arch=x86_64 2026/03/12 12:46:27 INFO installing wget (1.25.0-r0) arch=x86_64 INFO: Found 1 target... Target //:my_image up-to-date: bazel-bin/my_image INFO: Build completed successfully, 128 total actions ``` -------------------------------- ### Navigate to Go Demo Directory Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/getting-started/go.md Change the current directory to the 'greet-server' folder within the Go demos repository. ```shell cd greet-server ``` -------------------------------- ### Getting a shell and installing packages in a development Nginx container Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/migration/migration-tips.md Shows how to successfully obtain a shell in a Chainguard Nginx development variant and install additional packages using apk. ```bash docker run -it --entrypoint /bin/sh --user root cgr.dev/chainguard/nginx:latest-dev / # apk add php fetch https://packages.wolfi.dev/os/aarch64/APKINDEX.tar.gz (1/6) Installing xz (5.4.6-r0) (2/6) Installing libxml2 (2.12.6-r0) (3/6) Installing php-8.2-config (8.2.18-r0) (4/6) Installing readline (8.2-r3) (5/6) Installing sqlite-libs (3.45.1-r0) (6/6) Installing php-8.2 (8.2.18-r0) OK: 66 MiB in 38 packages / # ``` -------------------------------- ### Run Demonstration Image Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/sigstore/cosign/how-to-sign-an-sbom-with-cosign.md Runs the built Docker image. This command executes the entrypoint defined in the Dockerfile, displaying the 'I love FOSS!' message. ```sh docker run $DH_USERNAME/example-image ``` -------------------------------- ### Curl Request (Default) Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/getting-started/php.md Example curl request to the running application to get a random name combination. ```shell curl http://localhost:8000 ``` -------------------------------- ### Create a New Maven Project Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/libraries/java/build-configuration.md Generates a new Maven project using the quickstart archetype and navigates into the project directory. Ensure Maven cache is cleared beforehand. ```bash mvn archetype:generate \ -DgroupId=com.example \ -DartifactId=maven-example \ -DarchetypeArtifactId=maven-archetype-quickstart \ -DarchetypeVersion=1.5 \ -DinteractiveMode=false cd maven-example ``` -------------------------------- ### Initialize a new catalog starter organization Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainctl/chainctl-docs/chainctl_starter_init.md Use this command to start a new catalog starter organization. It prompts for authentication and registers a new identity and organization. ```bash chainctl starter init [flags] ``` -------------------------------- ### Run and Test dnmonster Service Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/migration/porting-apps-to-chainguard/index.md Starts the dnmonster container and fetches an identicon. Useful for initial setup and testing. ```bash docker run -d -p 8080:8080 amouat/dnmonster curl --output ./monster.png 'localhost:8080/monster/wolfi?size=100' ``` -------------------------------- ### Helm Chart Values File Example Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/how-to-use/use-chainguard-iamguarded-helm-charts/index.md Example content for a values.yaml file used to configure Helm chart installations. It specifies registry, repository, and tag. Remember to pin to a specific version instead of using 'latest'. ```yaml image: registry: cgr.dev repository: $ORGANIZATION/rabbitmq # replace $ORGANIZATION tag: latest # pin to specific version instead of latest ``` -------------------------------- ### Create Example Image Directory Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/sigstore/cosign/how-to-sign-an-sbom-with-cosign.md Creates a directory for the example Docker image and changes the current directory to it. This is the first step in preparing to build a container image. ```sh mkdir -p ~/example-image && cd ~/example-image ``` -------------------------------- ### Example: Setup Custom OIDC Provider Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainctl/chainctl-docs/chainctl_iam_identity-providers_create.md Example of setting up a custom OIDC provider named 'google' and binding new users to the 'viewer' role. This demonstrates the use of required OIDC parameters and the default role assignment. ```bash chainctl iam identity-providers create --name=google --parent=example \ --oidc-issuer=https://accounts.google.com \ --oidc-client-id=foo \ --oidc-client-secret=bar \ --default-role=viewer ``` -------------------------------- ### Navigate into Demo Directory Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/getting-started/postgres/index.md Change the current directory into the cloned educational images demo repository. ```sh cd edu-images-demos ``` -------------------------------- ### Example Build Logs Output Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/features/ca-docs/custom-assembly-chainctl.md This is an example of the build logs that are displayed after selecting a build report from the prompt. ```output 2025-04-17T16:00:08-07:00[INFO]Building image with locked configuration: {Contents:{BuildRepositories:[] RuntimeRepositories:[https://apk.cgr.dev/45a0c61eEXAMPLEf050c5fb9ac06a69eed764595] ``` -------------------------------- ### Install Package by Major Version Prefix Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/wolfi/apk-version-selection.md Installs a package matching a major version prefix using fuzzy matching. This ensures you get a specific major release series without accidentally upgrading to a new major version. ```sh apk add go=~1 ``` ```sh apk add erlang=~26 ``` -------------------------------- ### Example Bazel Build Output Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/build-tools/apko/bazel-rules.md This is an example of the output you might see when building an image with Bazel, including package installation details and layer digests. It also shows expected informational messages about duplicate package IDs and cache hits. ```text INFO: Analyzed target //:wolfi_base (123 packages loaded, 656 targets configured). INFO: From Action wolfi_base: 2026/03/12 12:46:27 INFO installing wolfi-keys (1-r13) arch=aarch64 2026/03/12 12:46:27 INFO installing wolfi-baselayout (20230201-r28) arch=aarch64 2026/03/12 12:46:27 INFO installing wolfi-keys (1-r13) arch=x86_64 2026/03/12 12:46:27 INFO installing wolfi-baselayout (20230201-r28) arch=x86_64 2026/03/12 12:46:27 INFO installing ca-certificates-bundle (20251003-r4) arch=x86_64 ... 2026/03/12 12:46:27 INFO installing wolfi-base (1-r7) arch=x86_64 2026/03/12 12:46:27 INFO layer digest: sha256:44cc053506b4e236f7e32026147836ce082fa58d0a329ff2aab1bb61d0c6bcfc arch=x86_64 INFO: Found 1 target... Target //:wolfi_base up-to-date: bazel-bin/wolfi_base INFO: Build completed successfully, 128 total actions ``` -------------------------------- ### Navigate to Cloned Repository Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/migration/migration-guides/migrating-dotnet.md Enter the newly cloned demo application repository directory. ```shell cd edu-images-demos/ ``` -------------------------------- ### Discover GitHub Actions Dependencies Examples Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainctl/chainctl-docs/chainctl_actions_discover.md Examples demonstrating how to use chainctl actions discover with different targets. These include the current directory, a specific action reference, and a GitHub repository. ```bash chainctl actions discover ``` ```bash chainctl actions discover . ``` ```bash chainctl actions discover actions/checkout@v4 ``` ```bash chainctl actions discover chainguard-dev/mono ``` -------------------------------- ### Create Dockerfile for Python Dev Container Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/how-to-use/dev-containers/index.md Defines the Docker image for the dev container, starting from a Chainguard Python base image. It installs necessary utilities, sets the user to nonroot, and installs Python-specific packages like pylance and debugpy. ```dockerfile FROM chainguard/python:latest-dev USER root RUN apk update && apk add posix-libc-utils && ldconfig USER nonroot RUN pip install pylance debugpy ``` -------------------------------- ### Apply configuration from a file and save as new repository Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainctl/chainctl-docs/chainctl_images_repos_build_edit.md Apply a build configuration from a file and save the result as a new repository. ```bash chainctl images repos build edit --file=config.yaml --save-as=my-new-python ``` -------------------------------- ### Re-install Chainguard Keyring with pip Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/libraries/access.md Re-install the `keyrings-chainguard-libraries` package with specific flags to ensure you get the Chainguard-built package after initial setup. ```shell pip install keyrings-chainguard-libraries --ignore-installed --no-cache-dir ``` -------------------------------- ### Setting up Local Wolfi Test Environment Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/wolfi/building-a-wolfi-package.md Use 'make local-wolfi' to launch a Docker container with your packages and melange keys mounted for testing. ```shell ❯ make local-wolfi docker run --rm -it \ --mount type=bind,source="/home/erika/Projects/os/packages",destination="/work/packages",readonly \ --mount type=bind,source="/home/erika/Projects/os/local-melange.rsa.pub",destination="/etc/apk/keys/local-melange.rsa.pub",readonly \ --mount type=bind,source="/tmp/tmp.LXnQu0hkFn/repositories",destination="/etc/apk/repositories",readonly \ -w "/work/packages" \ cgr.dev/chainguard/wolfi-base:latest d2df519c59df:/work/packages# ``` -------------------------------- ### Dockerfile for dnmonster Service Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/migration/porting-apps-to-chainguard/index.md Defines the build environment for the dnmonster Node.js service using Debian. Includes package installations and user setup. ```Dockerfile FROM node RUN apt-get update && apt-get install -yy --no-install-recommends \ libcairo2-dev libjpeg62-turbo-dev pango1.0-dev libgif-dev \ librsvg2-dev build-essential g++ #Create non-root user RUN groupadd -r dnmonster && useradd -r -g dnmonster dnmonster RUN install -d -o dnmonster -g dnmonster /home/dnmonster RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY package.json /usr/src/app/ RUN npm install COPY ./src /usr/src/app RUN chown -R dnmonster:dnmonster /usr/src/app USER dnmonster EXPOSE 8080 CMD [ "npm", "start" ] ``` -------------------------------- ### Python 'Hello, World!' Example Source: https://github.com/chainguard-dev/edu/wiki/Style-Guide Demonstrates a basic 'Hello, World!' program in Python using the print() function. Includes the code to be executed and its expected output. ```sh print('Hello, World!') ``` -------------------------------- ### Node.js Dockerfile Example Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/getting-started/node.md This Dockerfile sets up a Node.js environment using a Chainguard base image, installs production dependencies, and specifies the entrypoint script. ```Dockerfile FROM cgr.dev/chainguard/node ENV NODE_ENV=production WORKDIR /app COPY --chown=node:node ["package.json", "package-lock.json", "server.js", "./"] RUN npm install --omit=dev CMD [ "server.js" ] ``` -------------------------------- ### Create a Hello World Skill Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/agent-skills/skills-registry.md Creates a directory and a SKILL.md file for a basic 'hello-world' skill. This is used to verify the skills registry setup. ```shell mkdir hello-world cat > hello-world/SKILL.md << 'EOF' --- name: hello-world description: A simple hello world skill. Use this to verify your skills registry setup is working end to end. --- When this skill is invoked, greet the user with: "Hello from Chainguard Agent Skills! Your skill installed and loaded successfully." If the user provides their name, greet them by name instead: "Hello, ! Welcome to Chainguard Agent Skills." EOF ``` -------------------------------- ### Python Requirements File Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/how-to-use/install-apks-in-distroless-variants.md A requirements file listing Python dependencies. In this example, it specifies 'mysqlclient', which requires specific system-level APKs to be installed at both build and runtime. ```plaintext mysqlclient ``` -------------------------------- ### Navigate to Go Demo Directory Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/getting-started/go.md Access the 'go-digester' folder to start the Go demo. ```shell cd go-digester ``` -------------------------------- ### Example apko Build Output Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/features/packages/private-apk-repos/index.md This output indicates that the apko build process successfully used the private APK repository to install the specified package (wget) and other dependencies. ```shell 2025/02/20 21:23:48 INFO Building images for 1 architectures: [amd64] 2025/02/20 21:23:48 INFO setting apk repositories: [https://apk.cgr.dev/$ORGANIZATION] 2025/02/20 21:23:50 INFO installing ca-certificates-bundle (20241121-r1) 2025/02/20 21:23:50 INFO installing wolfi-baselayout (20230201-r16) 2025/02/20 21:23:50 INFO installing ld-linux (2.40-r8) 2025/02/20 21:23:50 INFO installing glibc (2.40-r8) 2025/02/20 21:23:50 INFO installing libgcc (14.2.0-r8) 2025/02/20 21:23:50 INFO installing glibc-locale-posix (2.40-r8) 2025/02/20 21:23:50 INFO installing libcrypto3 (3.4.1-r0) 2025/02/20 21:23:50 INFO installing libssl3 (3.4.1-r0) 2025/02/20 21:23:50 INFO installing wget (1.25.0-r0) 2025/02/20 21:23:50 INFO setting apk repositories: [https://apk.cgr.dev/$ORGANIZATION] 2025/02/20 21:23:50 INFO built image layer tarball as /tmp/apko-temp-2854430999/apko-x86_64.tar.gz . . . ``` -------------------------------- ### Clone Demo Repository and Navigate Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/build-tools/melange/getting-started-with-melange.md Clone the melange-php-demos repository and navigate into the hello-minicli directory to begin. ```shell git clone git@github.com:chainguard-dev/melange-php-demos.git cd melange-php-demos/hello-minicli ``` -------------------------------- ### Run the Go Greeter Container (Default) Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/getting-started/go.md Execute the built 'go-greeter' container to see the default greeting message. ```shell docker run go-greeter ``` -------------------------------- ### Run MCP Server Locally for Stdio Input (Docker) Source: https://github.com/chainguard-dev/edu/blob/main/content/mcp-server-ai-docs.md Starts the MCP server in a Docker container that waits for standard input. This is used for testing local Docker setups. ```bash docker run --rm -i ghcr.io/chainguard-dev/ai-docs:latest serve-mcp ``` -------------------------------- ### Minecraft Server Output Example Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/getting-started/jre-minecraft/index.md Example output from a running Minecraft server container, showing environment variables being set and server initialization. ```text ... minecraft-java-1 | Setting difficulty=easy minecraft-java-1 | Setting gamemode=survival minecraft-java-1 | Setting level-name=GuardCraft minecraft-java-1 | Setting level-seed=69420018030897796 minecraft-java-1 | Setting motd=Welcome to GuardCraft! ... minecraft-java-1 | [19:20:01] [Server thread/INFO]: Preparing level "GuardCraft" ... ``` -------------------------------- ### Create Demo Java Application Directory Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/tooling/building-java-containers-with-jib.md Sets up the necessary directory structure for a new Java project. ```shell mkdir jib-demo cd jib-demo ``` ```shell mkdir -p src/main/java/com/example/demo ``` -------------------------------- ### Obtain Token for Specific Private Container Image using Crane Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/features/using-the-tag-history-api.md An example of using `crane auth token` to get a token for a specific private image, such as `chainguard-base` within the `foo.com` organization. ```shell auth_header="$(crane auth token -H cgr.dev/foo.com/chainguard-base)" ``` -------------------------------- ### Start Docker Compose Environment with Specific File Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/getting-started/laravel.md Command to bring up a Docker Compose environment using a specific Compose file, typically used for custom configurations like a distroless setup. ```shell docker compose -f docker-compose-distroless.yaml up ``` -------------------------------- ### Convert Entire Dockerfile Inline Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/migration/dockerfile-conversion.md Convert a complete Dockerfile provided via a heredoc input stream. This example shows conversion of FROM and RUN instructions, including the addition of a USER root directive for package installations. ```shell cat < artifact ``` -------------------------------- ### Compare Go container images and format output with jq Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainctl-usage/comparing-images.md This example compares the `latest` and `latest-dev` versions of the public `go` Chainguard Container image. The output is piped to `jq` for pretty-printing, making the JSON output more readable. Ensure `jq` is installed to use this formatting. ```sh chainctl images diff cgr.dev/chainguard/go:latest cgr.dev/chainguard/go:latest-dev | jq ``` -------------------------------- ### Create a Test File Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/sigstore/fulcio/how-to-generate-a-fulcio-certificate.md Create a simple text file to be used for signing. ```bash echo "test file contents" > test-file.txt ``` -------------------------------- ### Create Demo Application Directory Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/getting-started/python.md Creates a new directory for the demo application and navigates into it. ```shell mkdir ~/linky/ && cd $_ ``` -------------------------------- ### Create Demo Directory Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainguard-images/about/getting-started-distroless.md Creates a new directory for the demo application and navigates into it. ```sh mkdir ~/distroless-php && cd $_ ``` -------------------------------- ### View chainctl Configuration Help Source: https://github.com/chainguard-dev/edu/blob/main/content/chainguard/chainctl-usage/manage-chainctl-config.md Run this command to see all available options for managing chainctl configuration. ```shell chainctl config -h ``` -------------------------------- ### Verify Rekor CLI Installation Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/sigstore/rekor/how-to-install-rekor.md After installation, use this command to verify that rekor-cli has been installed successfully and to display its version information. ```sh rekor-cli version ``` -------------------------------- ### Install Redis Server on macOS Source: https://github.com/chainguard-dev/edu/blob/main/content/open-source/sigstore/rekor/install-a-rekor-instance.md Installs Redis on macOS using Homebrew. Ensure Homebrew is installed first by visiting brew.sh. ```bash brew install redis ```