rocksdev/mock-docker-image

By rocksdev

Updated over 1 year ago

Test Docker image from https://github.com/canonical/oci-factory

Image

67

Mock Ubuntu Docker image | Ubuntu

Current Mock Ubuntu Docker image Docker Image from Canonical, based on Ubuntu. Receives security updates and rolls to newer Mock Ubuntu Docker image or Ubuntu release. This repository is free to use and exempted from per-user rate limits.

About Mock Ubuntu Docker image

This is a long description for a mock ROCK that is only used for testing and demonstration purposes.

Tags and Architectures

LTS Up to 5 years of free security maintenance on LTS channels.

ESM Up to 10 years of customer security maintenance from Canonical's restricted repositories.

Channel TagsSupported untilCurrentlyArchitectures
1.3-22.04_beta1.3-22.04_edge, 1.3_edge-Mock Ubuntu Docker image 1.3 on Ubuntu 22.04 LTSamd64
track_risk

Channel Tags shows the most stable channel for that track ordered stable, candidate, beta, edge. More risky channels are always implicitly available. So if beta is listed, you can also pull edge. If candidate is listed, you can pull beta and edge. When stable is listed, all four are available. Images are guaranteed to progress through the sequence edge, beta, candidate before stable.

Commercial use and Extended Security Maintenance channels

If your usage includes commercial redistribution, or requires ESM or unavailable channels/versions, please get in touch with the Canonical team (or using rocks@canonical.com).

Usage

Launch this image locally:

docker run -d --name mock-docker-image-container -e TZ=UTC --rm --restart no ubuntu/mock-docker-image:1.3-22.04_beta

The container will exit after printing the message, so there's nothing to do once it has finished its execution. If there are problems executing this container, check the Debug section below.

Parameters

ParameterDescription
--restart FalseMake sure the container is not restarted after execution.
CMD --greeting="Print this message instead"Change the default Hello World message by a custom greeting.

Testing/Debugging

To debug the container:

docker logs -f mock-docker-image-container

To get an interactive shell:

docker exec -it mock-docker-image-container /bin/bash

If the container starts but nothing is being printed to stdout, then the first thing to check is whether the hello package is actually installed inside the image:

docker run --rm -it --entrypoint bash mock-docker-image

This will take you inside the container, where you can then test the hello package:

hello

If you get a command not found, then hello is either not installed or not in PATH. In either case, there might be an issue with the image build, so we recommend submitting a bug report.

Deploy with Kubernetes

Works with any Kubernetes; if you don't have one, we recommend you install MicroK8s and microk8s.enable dns storage then snap alias microk8s.kubectl kubectl.

Download mock-config-file and mock-docker-image-deployment.yml and set containers.mock-docker-image.image in mock-docker-image-deployment.yml to your chosen channel tag (e.g. ubuntu/mock-docker-image:1.3-22.04_beta), then:

kubectl create configmap mocker-docker-image-config --from-file=mock-config=mock-config-file
kubectl apply -f mock-docker-image-deployment.yml

You should now be able to see the "Hello World" output by looking up the container logs.

Bugs and feature requests

If you find a bug in our image or want to request a specific feature, please file a bug here:

https://bugs.launchpad.net/ubuntu-docker-images/+filebug

Please title the bug "mock-docker-image: <issue summary>". Make sure to include the digest of the image you are using, from:

docker images --no-trunc --quiet ubuntu/mock-docker-image:<tag>

Deprecated channels & tags

These channels (tags) are not updated anymore. Please upgrade to newer channels, or reach out if you can't upgrade.

TrackVersionEOLUpgrade Path
track

Docker Pull Command

docker pull rocksdev/mock-docker-image