I've seen that Red Hat have their own registry to make available RHEL atomic and minimal docker images.
Are there equivalent CentOS images publically available? I wasn't able to find any on Docker Hub or the Project Atomic downloads.
With Red Hat Universal Base Image being made available I'd assume that is now their solution to my question since it can be used without a RHEL subscription.
However, it does seem that you need a RHEL subscription to install additional packages onto the base images.
Related
Unfortunately, I'm in an environment where I have to use CentOS 4.8 for business reasons.
I'd like to create an image in Docker to manage this horrible old version of OS.
I checked that some users put the image on the Docker Hub, and I checked that some images are working normally.
And the question here is, how did they create these images? Is it possible to create an image by ISO itself, or by other means, rather than an image derived from the official image distributed by Docker? (Official image exists from CentOS 5 version onwards)
and I've found that I can extract Ubuntu images from ISO through searching.
However, there is no talk of CentOS and RHEL clone OSs.
Thank you.
I am going to install gerrit using docker images.
And I found some similar images in gerrit dockerhub (https://hub.docker.com/r/gerritcodereview/gerrit)
What is the difference between gerritcodereview/gerrit:X.X.X and gerritcodereview/gerrit:X.X.X-ubuntu ?
If I'm using Ubuntu 18.04 as OS, should I use the image gerritcodereview/gerrit:X.X.X-ubuntu18?
The -distributionXX specifies the distribution the image is based on. A quick look at gerritcodereview's Docker Hub page shows that gerritcodereview:3.3.0 is the same image as gerritcodereview:3.3.0-centos8.
The version without a specified distribution can be considered the developer's preferred version - if you don't need a specific distribution, use this one. But if you need the image to be based on a specific distribution, which usually means you're using that image as a base for an image you are building, you can use the -distributionXX tag. This guarantees, for example, that you'll know which package manager you have to use to install any additional dependencies.
Gitlab lets you use any image on Docker Hub but how can I restrict to Docker Certified images? The advice I read in Docker Reference Architecture: Building a Docker Secure Supply Chain implies that this is something I do (manually) when I look for an image:
Picking the right images from Docker Hub is critical. Start with
Certified Images, then move on to official images. Lastly, consider
community images. Only use community images that are an automated
build. This helps ensure that they are updated in a timely fashion.
Verification of the freshness of the image is important as well.
...
When searching Docker Hub for images, make sure to check the Docker Certified checkbox.
But can I set up Gitlab to ensure that the images I'm using are Certified Images? For example, suppose an image I chose one day loses its certification? I would want to be notified of the vulnerability automatically, let's say at build time or even more proactively.
https://blog.ubuntu.com/2018/07/09/minimal-ubuntu-released
says
The 29MB Docker image for Minimal Ubuntu 18.04 LTS serves as a highly
efficient container...
...
On Dockerhub, the new Ubuntu 18.04 LTS image is now the new Minimal
Ubuntu 18.04 image. Launching a Docker instance with docker run
ubuntu:18.04 therefore launches a Docker instance with the latest
Minimal Ubuntu.
I ran the exact command mentioned:
docker run ubuntu:18.04
Then I ran "docker images" which said:
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu 18.04 16508e5c265d 5 days ago 84.1MB
Why does that output say 84.1MB? The Ubuntu web page I quoted says it should be 29MB.
Am I doing something wrong?
Am I measuring the size incorrectly?
How can I get an Ubuntu image that's only 29MB?
The article states that Docker Hub hosts a "standard" image, which is bigger than the cloud image. The cloud image is the new thing they introduced and it weighs 29MB while the standard image weighs 32MB.
The cloud image is not available on Docker Hub.
But still, where did the 84MB come from? It's because you are downloading a compressed image from the registry. Which, in this case, only weighs 32MB. Once downloaded, it's decompressed into its usable format and stored locally on your machine.
Meaning everything is in order. Where do you get that cloud image from? Well, I'd start by looking at:
[...] are available for use now in Amazon EC2, Google Compute Engine (GCE) [...]
If you'd like to use it with a private cloud, this is where you download the image from link to Ubuntu Minimal Cloud Images
-edit-
addressing your comment, those private cloud sizes may vary. This is at least partially, if not mostly, due to differences between various hypervisor stacks. As is hinted at in the article:
Cloud images also contain the optimised kernel for each cloud and supporting boot utilities.
--
Just as an update, these days (~three years later), the latest 18:04 image weighs 25MB in its compressed format, so the exact numbers from my original answer are no longer valid, but the point is still valid.
I have GitLab, GitLab-CI and gitlab-ci-multi-runner running on different machines. I've successfully added a runner using docker and the ruby:2.1 image as detailed on https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-repository.md
What I'd like to do next is have runners for a minimal Ubuntu 12.04, 14.04 configured. Not knowing docker, I thought I'd try to use the ubuntu:14.04 and ubuntu:12.04 images. However when the start up and try to clone my project repo, they complain about git not being found. I then assumed that with these images, git wasn't installed. So my questions are:
What tools need to be available in a docker image to be used "out-of-the-box" by the gitlab-ci-multi-runner
Are there a set of images already available for various OS's with these already included
Should I really be looking to create my own docker images for this purpose?
Popular base images that contain commonly used software for building software are (based on) buildpack-deps https://hub.docker.com/r/library/buildpack-deps/ (e. g. openjdk is based on that)
In your case you could specify FROM buildpack-deps:stretch-scm which is based on Debian Stretch and includes source code management (SCM) tools like git.
I suppose you could create a Gitlab Runner that uses these images as default. But I think you should always specify the needed image in your .gitlab-ci.yml-file.
I would always hesitate in creating my own Docker Images, because there are a lot available. Still many specific ones are maintained (or better not maintained) by one person for a specific use case that often does not fit your application. The best choice would be to pick a base-image and only add minor RUN commands for the customization.