docker-image

How to use label filter on intermediate containers that get created during build (assuming LABEL is set immediately after FROM command)?

耗尽温柔 提交于 2020-05-17 07:45:09
问题 In the dockerfile, suppose I set a LABEL immediately after the FROM command, then is the label applied to every intermediate container and image generated in the subsequent step? I know that intermediate containers get removed during build after each step. But I am facing an issue where-in some of the intermediate container are not getting removed. This is causing the images created out of these containers (during the build process) to become dangled. I can see the images in docker images and

Can't create a docker image for COPY failed: stat /var/lib/docker/tmp/docker-builder error

我与影子孤独终老i 提交于 2020-04-25 06:53:09
问题 I want to create a docker image. This is my work directory: Dockerfile.in test.json test.py And this is my Dockerfile: COPY ./test.json /home/test.json COPY ./test.py /home/test.py RUN python test.py When i launch this command: docker build -f Dockerfile.in -t 637268723/test:1.0 . It gives me this error: `Step 1/5 : COPY ./test.json /home/test.json ---> Using cache ---> 6774cd225d60 Step 2/5 : COPY ./test.py /home/test.py COPY failed: stat /var/lib/docker/tmp/docker-builder428014112/test.py:

Can't create a docker image for COPY failed: stat /var/lib/docker/tmp/docker-builder error

♀尐吖头ヾ 提交于 2020-04-25 06:52:28
问题 I want to create a docker image. This is my work directory: Dockerfile.in test.json test.py And this is my Dockerfile: COPY ./test.json /home/test.json COPY ./test.py /home/test.py RUN python test.py When i launch this command: docker build -f Dockerfile.in -t 637268723/test:1.0 . It gives me this error: `Step 1/5 : COPY ./test.json /home/test.json ---> Using cache ---> 6774cd225d60 Step 2/5 : COPY ./test.py /home/test.py COPY failed: stat /var/lib/docker/tmp/docker-builder428014112/test.py:

Can't create a docker image for COPY failed: stat /var/lib/docker/tmp/docker-builder error

扶醉桌前 提交于 2020-04-25 06:52:13
问题 I want to create a docker image. This is my work directory: Dockerfile.in test.json test.py And this is my Dockerfile: COPY ./test.json /home/test.json COPY ./test.py /home/test.py RUN python test.py When i launch this command: docker build -f Dockerfile.in -t 637268723/test:1.0 . It gives me this error: `Step 1/5 : COPY ./test.json /home/test.json ---> Using cache ---> 6774cd225d60 Step 2/5 : COPY ./test.py /home/test.py COPY failed: stat /var/lib/docker/tmp/docker-builder428014112/test.py:

How to find all image tags of a running Docker container?

孤人 提交于 2020-03-18 04:25:08
问题 I have a bunch of Docker containers running on a server and I used the "latest" tag or no tag at all for all of them. Now I want to freeze the image versions, but I have no idea when I pulled these images, so I can't tell which version "latest" is referring to. docker ps is just showing me that the containers use the "latest" or no tag, like this: # docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 371d6675888b node:latest "npm start" 6 days ago Up 2 hours project_xyz_1

Docker: Reverse Engineering of an Image

我的未来我决定 提交于 2020-03-17 10:42:11
问题 When we use Docker it's very easy push and pull image in a public repository in our https://hub.docker.com but this repository it's free only for public image(only one can be private). Currently it's possible to execute a reverse engineering of a public image in repository and read the source code of project ? 回答1: You can check how an image was created using docker history <image-name> --no-trunc Update: Check dive which is a very nice tool that allows you to views image layers. 回答2: As

Permission issues while docker push

醉酒当歌 提交于 2020-01-24 19:33:09
问题 I'm trying to push my docker image to google container image registry but get an error which says I do not have the needed permission to perform this operation. I have already tried gcloud auth configure-docker but it doesn't work for me. I first build the image using: docker build -t gcr.io/trynew/hello-world-image:v1 . Then I'm trying to attach a tag and push it: docker push gcr.io/trynew/hello-world-image:v1 This is my output : The push refers to repository [gcr.io/trynew/hello-world-image

Permission issues while docker push

我与影子孤独终老i 提交于 2020-01-24 19:33:01
问题 I'm trying to push my docker image to google container image registry but get an error which says I do not have the needed permission to perform this operation. I have already tried gcloud auth configure-docker but it doesn't work for me. I first build the image using: docker build -t gcr.io/trynew/hello-world-image:v1 . Then I'm trying to attach a tag and push it: docker push gcr.io/trynew/hello-world-image:v1 This is my output : The push refers to repository [gcr.io/trynew/hello-world-image

docker build --build-arg SSH_PRIVATE_KEY=“$(cat ~/.ssh/id_rsa)” returning empty

寵の児 提交于 2020-01-14 04:17:27
问题 I want to be able to read the contents of the file ~/.ssh/id_rsa and pass the same to my build stage of the image. When I use the command docker build --build-arg SSH_PRIVATE_KEY="$(cat ~/.ssh/id_rsa)" and then I try to echo that inside the container during a build, I get empty. RUN echo "$SSH_PRIVATE_KEY" > /priv_key \ && cat /priv_key the result is Step 6/14 : RUN echo "$SSH_PRIVATE_KEY" > /priv_key && cat /priv_key ---> Running in c8d6e3c88cd8 Removing intermediate container c8d6e3c88cd8

how to create docker image from an ISO file?

六眼飞鱼酱① 提交于 2020-01-13 18:08:32
问题 I wanna create a docker image from an ISO file. and I meet the same question like this iso to docker file I did same operations with him , and I know it's wrong now. now what i have is: an ISO file. my own ISO file, based on ubuntu but it's not ubuntu. a computer, running ubuntu on it. and I wanna know the detail operations to create a docker image from this ISO file. if use VM, I hope i could get certainly operations. or if don't need VM, what should I do ? I have searched many docs... like