Questions tagged [docker-build]

The Docker CLI (Command Language Interpreter) command for building Docker images.

Official documentation for this command is available here:

https://docs.docker.com/engine/reference/commandline/build/

560 questions
0
votes
1 answer

How hash IDs are managed for each RUN statements in Dockfile?

For example, I may have the following Dockfile. When I run docker build, for each RUN, there is a spearate hash (e.g., 1d9c17228a9e), and it runs very fast it had run already. I guess each hash is associated an actual file at the backend. Is it…
user1424739
  • 11,937
  • 17
  • 63
  • 152
0
votes
1 answer

Why can't I connect to localhost port 5000, why does it get refused?

I'm trying to build a docker image, but whenever I run the app my connection to localhost gets refused. The problem does not only occur with port 5000, but also with every else. I'm running the Docker Toolbox on Windows. My command is : docker run…
0
votes
0 answers

Spark docker image

I want to build a spark 2.4 docker image.I follow the steps as per the link The command that i run to build the image ./bin/docker-image-tool.sh -t spark2.4-imp build Here is the output i get. Its stuck at that fetch forever Any clue? UPDATE: Same…
Manikandan Kannan
  • 8,684
  • 15
  • 44
  • 65
0
votes
0 answers

How to build and deploy Reactjs to docker

I have developed sample application using ReactJS and able to run in localhost.Everything is fine. My doubt is like what is the build steps for deploying in the docker. Could someone help me out with your quick answer. Thanks in advance.
Sravan Shetty
  • 159
  • 2
  • 3
  • 9
0
votes
0 answers

SSL Error while trying docker for windows 10

I own a coporate laptop and I was trying to diligently the tutorial on the docker build. https://docs.docker.com/get-started/part2/#build-the-app When i tried that I started getting error on the certificates. Has someone faced similar kind of erros…
Sam Jacob Dev
  • 2,099
  • 2
  • 13
  • 5
0
votes
1 answer

How are layers cached in docker images?

I have this command in my docker file: ADD static/ /www/static/ I have noticed that re-running docker build reuses the cache, even though the contents of the static/ directory have changed. Is this normal? How does docker decide when a layer needs…
blueFast
  • 41,341
  • 63
  • 198
  • 344
0
votes
1 answer

Seems like both entrypoint and shell form cmd are separately executed

I have a customized image built from a public IBM Db2 image which has an entrypoint doing initializations. To create more than 1 database at startup, I wrote my own init.sh and put it in CMD clause. The COMMAND in 'docker ps' are like: …
Ziyan Li
  • 43
  • 4
0
votes
1 answer

What would happen if I build & run a docker with entrypoint/cmd from an image which has its own entrypoint/cmd?

Assume I have a base image with entrypoint/cmd, and a new layer built upon it also has an entrypoint/cmd. For example: Base: entrypoint ["base-start.sh"] cmd ["-initialize"] Assume they will output a timestamp and a message like …
Ziyan Li
  • 43
  • 4
0
votes
2 answers

How to build a Dockerfile / container from scratch to simply provide a file

I am trying to create a very simple image from scratch to simply provide a file. But Im not a bit skilled writing dockerfiles (on learning queue). Id like to whenever the container starts, it copy the file from the container into the local host upon…
0
votes
1 answer

Debug failed Docker builds on Gitlab CI and execute intermediate layers

I wonder how it would be possible to debug a Docker build by executing an intermediate build layer and run a debug container out of the layer to watch what is inside. Because I found no answer anywhere, I created my custom solution, which works…
Thomas Steinbach
  • 1,019
  • 1
  • 9
  • 19
0
votes
1 answer

Docker change existing image

Docker novice here. Is Docker analogous to GitHub in that you can commit changes to an image without having to re-build the image from scratch? If yes, what commands are used to do that? Right now every time I make a change to my code I delete the…
David
  • 19
  • 2
0
votes
1 answer

Docker build fails to find source folder for COPY command

I have a multi module maven project, and I want to create and publish an image for each module, except for a common, utility module, which is a dependency for all the other modules. Project structure is like this: project_root common_module …
logi0517
  • 813
  • 1
  • 13
  • 32
0
votes
1 answer

Docker build of Ubuntu 16.04 image fails - Connection failed, returned a non-zero code: 100

System details: macOS High Sierra IPv6 disabled Personal network (No corporate network, firewall, proxy etc.) Following is the Dockerfile: FROM ubuntu:16.04 RUN apt-get update && \ apt-get install -y \ python3 python3-numpy firefox jq git-core…
Ravindra S
  • 6,302
  • 12
  • 70
  • 108
0
votes
1 answer

Add new gems to an existing image and create a new Docker image

I'm trying to add new gems to an existing Docker image which doesn't have a Dockerfile. Below is what I have tried: - logged into the `bash` Docker image - gem install How do I create a new image after the above steps?
shiv455
  • 7,384
  • 19
  • 54
  • 93
0
votes
1 answer

Using --build-arg to modify FROM clause in Docker image

Say we have a Dockerfile like so: FROM node:9 and we build it with: docker build -t foo . my question is - is there a way to change the FROM clause using a --build-arg, something like this: ARG NODE_VERSION FROM node:$NODE_VERSION and the build…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817