我目前正在使用 dockerfile
运行一个容器,它使用一些参数和端口 .
我的问题是: docker-compose
是否覆盖 dockerfile
中 expose
的端口?
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS build-env
WORKDIR /app
COPY ./publish .
ENTRYPOINT ["dotnet","Server.dll","arg1"]
EXPOSE 8202
Docker-compose
services:
mp:
image: mp
build: ./mpserver
ports:
- 8202:8203 <-----lets say i change the left side in the dockerfile
在我的情况下 compose
可以改变 dockerfile
(s)内的参数? ( 8202
在 dockerfile
和 8203
撰写)
我可以在 dockerfile
中以某种方式 injected
设置参数,如 ENTRYPOINT
的参数吗? (在我们的案例中 arg1
)