Closed glasswingprince closed 11 months ago
https://github.com/docker-library/httpd/blob/master/2.4/httpd-foreground ? :thinking: :confused:
(If you're building our Dockerfile
from source for some reason, you probably want to use git clone
instead of just downloading it.)
Hello Team,
I have cloned.. but still getting the same error.
Regards Prince
From: Tianon Gravi @.> Sent: 28 June 2023 22:59 To: docker-library/httpd @.> Cc: Prince Kumar @.>; Author @.> Subject: Re: [docker-library/httpd] file not found in build context or excluded by .dockerignore: stat httpd-foreground: file does not exist (Issue #239)
https://github.com/docker-library/httpd/blob/master/2.4/httpd-foreground ? 🤔 😕
(If you're building our Dockerfile from source for some reason, you probably want to use git clone instead of just downloading it.)
— Reply to this email directly, view it on GitHubhttps://github.com/docker-library/httpd/issues/239#issuecomment-1611816205, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7EY3F2VPNYCHICRFMHOTODXNRSWDANCNFSM6AAAAAAZXLDBII. You are receiving this because you authored the thread.Message ID: @.***>
I'm sorry, but without more information we won't be able to help. :sweat_smile:
I'm not able to reproduce with either of docker build 'https://github.com/docker-library/httpd.git#:2.4'
or git clone https://github.com/docker-library/httpd.git && docker build httpd/2.4
:see_no_evil:
This is still an issue, when doing FROM httpd:latest it produces that error
Are you sure you are building in the right context (i.e. not building using the f
flag and being in the wrong folder)?
Are you sure you are building in the right context (i.e. not building using the
f
flag and being in the wrong folder)?
you are right. In my docker compose I had set the context to the directory where the docker file was located. but after removing that and just setting the dockerfile field to exactly where it is relative to the compose.yaml it worked. Btw what exactly is the context meant for?
@CapedBojji the context is the directory that gets sent to the build. When building an image you can't include files that aren't in that context (like from your user's Download directory for example). The context is also used to determine what changed and if a cached layer can be used instead of rebuilding it
in the DockerFile, line no 12, COPY httpd-foreground /usr/local/bin/