my intention is to able to pass some arguments to a docker container when calling the docker-compose for that container.
Something like
docker-compose up -d myContainer myArg1=hallo myArg2=world
My Docker file looks something like:
FROM mcr.microsoft.com/dotnet/core/runtime:2.2 AS final
WORKDIR /app
COPY Myproj/bin/Debug/netcoreapp2.1 .
ENTRYPOINT ["dotnet", "myproj.dll", myArg1, myArg2]
And the docker-compose.yml file looks like this:
version: '3.4'
services:
myContainer:
image: ${DOCKER_REGISTRY-}myContainerImage
build:
context: ../..
dockerfile: MyProj/Dockerfile
First of all I wonder if this is something doable and secondly how to do it