I am facing an issue when I try to create a custom image containing tensorflow. But when I use the official repositories I did not see that problem. Then I am trying to know which Docker file from https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/dockerfiles/dockerfiles was used to generate the Docker.hub image. Could you help me, please?
You can always use [docker image inspect][1] to get further information about an image's layers and how it was built locally.
On docker hub if you click on the tags tab, you can click on any image, and it will show you that info in a very nice annotation of that image's layers. Next to the dockerfile.
Related
I downloaded a Docker image and made some changes inside a container based on it. Then I commited those changes to create a new image that I would actually like to use.
docker images says that these images have about the same size. So, it seemed to me that Docker copied everything it needs to the new image.
Yet I can't remove the old image which I no longer need. It seems like I'm getting the worst of both worlds: neither is space conserved by a parenting relationship, nor can I delete the unwanted files.
What gives? Am I interpreting docker images output wrong (maybe it's not reporting the actual on-disk size)?
you may remove the first image with a force,
docker image rm -f $IMAGE_ID
As for the same size, it depends mainly on your changes, you can check if they match exactly on a byte level with:
docker image inspect IMAGE_NAME:$TAG --format='{{.Size}}'
I'm new to using Docker and wanted to understand how to add large folders (combined ~1GB) kept elsewhere (such as in SharePoint) to the Docker container using Dockerfile. What is the best way to add the files and can someone explain the commands to be used? For example, one method I have come across is the following:
ADD http://example.com/big.tar.xz /usr/src/things/
Does the /usr/src/things/ specify the location where I want to save the folders (not individual files) with respect to my original repository?
This answer is from: Adding large files to docker during build which covers the question at a high level. Can someone share details/commands for each step involved? One answer mentions not adding the files to the image but mounting as a volume. Is that a better option than using ADD in the Dockerfile.
Thanks!
I want to use yocto to build a customized image for an embedded system and I want to create a docker image from this custom image. Usually in docker one would build a image using a parent image e.g. FROM ubuntu:xenial. However, in this case there is no official image available, so I need to create a new base image. I looked up the docs for creating a base image but it doesn't explain the whole process. I would appreciate if anyone could give me a hint or a link for a tutorial or something.
Thank you!
Yes that is possible. A dockerfile would look like that:
FROM scratch
ADD app-container-image-python3-data-collector-container-x86-64.tar.bz2 /
But I would recommend having a look at meta-virtualization and oci-images, which you can generate directly and e.g. upload to docker.io.
I have VM in compute Engine running a docker image uploaded to the Container Registry.
If i push a new image with the same name, is "Reset" enough to load that image or should I keep doing stop+Start?
When you upload a docker image to the Container Registry, apart from the name, it would be wise to tag it. If you upload another image with the same name, and same tag, it is enough using reset for the VM to use the new image. Upon resetting, you will be using the image with the same name and tag of the image you first used to deploy a VM. If you do not use tags, the new images you push with the same name without tag will be automatically tagged as "latest", and that one will be used after doing "reset" to your VM.
When using tags, upon uploading the new image with same name and tag, the previous image will lose the tag and the newly uploaded will get it.
Is there any way to know what is in a public image other than downloading it and checking it out manually?
e.g. I can see on dockerhub various java images and a various ansible images, I would have to download quite a lot to determine which one to use and if any had both
The dockerfile lists some info but often there is inheritance and so you can't see all the info.
Is there anything that lists all the contained packages or an online service that lets you try them out without downloading the whole image?
MicroBadger lists the docker history of a Docker image and shows matching base images (with their layers as well). E.g. https://microbadger.com/images/ansible/ansible