I define the arguments in the Dockerfile, but I want to build all my Dockerfiles uniformly through docker compose, if the argument values are passed into the Dockerfile through docker-compose build
- my Dockerfile
... ARG ENVIRONMENT_VARIABLE RUN dotnet build path/to/my/porject.csproj -c $ENVIRONMENT_VARIABLE ... - my docker-compose.yaml
... my.image: image: myimage:123 container_name: my.image build: context: ../../ dockerfile: path/to/Dockerfile args: ENVIRONMENT_VARIABLE: #{ENVIRONMENT_VARIABLE} ...
docker run IMAGE ARGS