About 51 results
Open links in new tab
  1. dockerfile - How do I set environment variables during the "docker ...

    I'm trying to set environment variables in docker container during the build but without success. Setting them when using run command works but I need to set them during the build. Dockerfile FROM ...

  2. What's the difference between Docker Compose vs. Dockerfile

    Jul 4, 2019 · 70 Dockerfile and Docker Compose are two different concepts in Dockerland. When we talk about Docker, the first things that come to mind are orchestration, OS level virtualization, images, …

  3. Dockerfile if else condition with external arguments

    Apr 27, 2017 · Accepted answer does not cover "if else condition" part of the question. Would be better to rename it to "Dockerfile with external arguments" if condition check didn't mean to be a requirement.

  4. How to copy file from host to container using Dockerfile

    May 26, 2015 · Build the image from the Dockerfile --> docker build -t myubuntu c:\docker\ Build the container from your new image myubuntu --> docker run -d -it --name myubuntucontainer myubuntu …

  5. How does docker-compose.yml and Dockerfile work together?

    Mar 16, 2021 · The difference between Dockerfile and Compose file Docker can build images automatically by reading the instructions from a Dockerfile Compose is a tool for defining and running …

  6. How can I set an image name in a Dockerfile? - Stack Overflow

    Dec 17, 2025 · Tagging of the image isn't supported inside the Dockerfile. This needs to be done in your build command. However there are multiple ways to build an image. docker-compose.yml You can …

  7. How to get an environment variable value into Dockerfile during …

    Mar 19, 2019 · To clarify @TomHennen's comment, piping the Dockerfile to docker build - is, specifically, what doesn't work when you reference relative paths from your Dockerfile, regardless of …

  8. How do I run a docker instance from a DockerFile?

    Mar 18, 2016 · Download Dockerfile and Build a Docker Image Download the Dockerfile to a directory on your machine, and from that same directory, run the following docker build command. Make sure …

  9. bash - Clone private git repo with dockerfile - Stack Overflow

    Apr 30, 2014 · I have copied this code from what seems to be various working dockerfiles around, here is mine: FROM ubuntu MAINTAINER Luke Crooks "luke@pumalo.org" # Update aptitude with new …

  10. docker - ERROR: failed to solve: failed to read dockerfile: open ...

    May 15, 2024 · When you run docker build -t ad_bot ., Docker looks in the current directory for a file named Dockerfile. If your Dockerfile is named something else you need to specify it using the -f or - …