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
409
votes
6 answers

Why is docker build not showing any output from commands?

Snippet from my Dockerfile: FROM node:12.18.0 RUN echo "hello world" RUN psql --version When I run docker build . I don't see any output from these two commands even if they are not cached. The documentation says that docker build is verbose by…
Noname
  • 4,432
  • 2
  • 10
  • 17
361
votes
39 answers

Docker - unable to prepare context: unable to evaluate symlinks in Dockerfile path: GetFileAttributesEx

I just downloaded Docker Toolbox for Windows 10 64-bit today. I'm going through the tutorial. I'm receiving the following error when trying to build an image using a Dockerfile. Steps: Launched Docker Quickstart terminal. testdocker after…
villanux
  • 3,631
  • 2
  • 12
  • 5
65
votes
7 answers

How to remove intermediate images from a build after the build?

When you build your multi-stage Dockerfile with docker build -t myimage . it produces the final image tagged myimage, and also intermediate images. To be completely clear we are talking here not about containers, but about images. It looks like…
Andrew Savinykh
  • 25,351
  • 17
  • 103
  • 158
64
votes
4 answers

docker build with Dockerfile, but the image has no name or tag

I installed Docker desktop for mac. The version is 1.12.0-rc4-beta19 when I use docker build -t self/centos:java8 . the image has no name or tag REPOSITORY TAG IMAGE ID CREATED SIZE
viewking
  • 675
  • 1
  • 6
  • 8
63
votes
11 answers

Error: "Failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest" when building a Docker image

I get the error: failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest when building the following Dockerfile: FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8 COPY . /inetpub/wwwroot
MiguelSlv
  • 14,067
  • 15
  • 102
  • 169
61
votes
1 answer

Git clone verbose output?

I have to clone a couple of big repos in my Dockerfile. It really can take an hour to clone a single repo and I want to see standard Git progress output to understand what's going on. However, when Git is started from the Dockerfile, I see no git…
Aleksei Petrenko
  • 6,698
  • 10
  • 53
  • 87
55
votes
3 answers

Docker container doesn't expose ports when --net=host is mentioned in the docker run command

I have a CentOS docker container on a CentOS docker host. When I use this command to run the docker image docker run -d --net=host -p 8777:8777 ceilometer:1.x the docker container get host's IP but doesn't have ports assigned to it. If I run the…
arevur
  • 553
  • 1
  • 4
  • 7
40
votes
2 answers

How to ignore folders to send in docker build context

I am facing an issue of large docker build context because of my project structure. In my root directory I have lib folder for common code and folders of micro-services. Now I want to build for miscroservice1 to include only lib folder and to ignore…
Ibtesam Latif
  • 1,175
  • 1
  • 10
  • 13
38
votes
2 answers

How to Specify $docker build --network="host" mode in docker-compose at the time of build

While building docker image like docker build -t name:tag --network="host" so it will Set the networking mode for the RUN instructions during build (default "default") So I am trying to build Docker image with DOKCER-COMPOSE: version: '3' services: …
Dhairya
  • 743
  • 2
  • 11
  • 29
36
votes
2 answers

How to see docker build "RUN command" stdout? (docker for windows)

In the past I could simply do something like this: Dockerfile: FROM ubuntu RUN echo "test" which would output test to my shell. I used this as a way of debugging my builds. In the latest stable version of docker for windows the build output looks…
Theo
  • 2,262
  • 3
  • 23
  • 49
34
votes
2 answers

dockerfile: how use CMD or ENTRYPOINT from base image

I have several base docker images which are not owned by me (so I cannot modify them). However, I'm creating new images from them with additional things installed. What I can't figure out is how to tell dockerfile to copy the CMD (or ENTRYPOINT) of…
Dave C
  • 1,572
  • 4
  • 23
  • 34
33
votes
1 answer

Docker build from Dockerfile with more memory

How to docker build from Dockerfile with more memory? This is a different question from this Allow more memory when docker build a Dockerfile When installing the software natively, there is enough memory to successfully build and install the marian…
alvas
  • 115,346
  • 109
  • 446
  • 738
32
votes
3 answers

Docker Build throwing a error -"Docker output clipped, log limit 1MiB reached"

While Building my docker Image in Docker Desktop for windows,after some sort of time It throwing a error: => => # [output clipped, log limit 1MiB reached] I tired configuring the log file size in daemon file and restarted the docker service …
Debugger
  • 690
  • 1
  • 18
  • 41
29
votes
5 answers

How to set Architecture for docker build to arm64?

I have a Dockerfile that I run on amd64 but want to run on arm64. Since go build tool takes GOARCH=arm64 as argument I don't need any other cross compilation tool to make the binary. # Run the build FROM…
tirithen
  • 3,219
  • 11
  • 41
  • 65
29
votes
2 answers

What is the most light weight base image I can use to build a Dockerfile?

I usually use a Ubuntu or Arch Linux image but I found out recently that there is an OS called CoreOS specifically for docker containers. As I am new to docker I am not sure which one would be the best base image to build my Dockerfile. It seems…
Jayabalan Bala
  • 997
  • 1
  • 9
  • 16
1
2 3
37 38