Even if @mchawre’s answer seems to directly answer OP’s question “syntactically speaking” (as a Dockerfile was asked), a docker-compose.yml is definitely the way to go to make a docker run command, as custom as it might be, reproducible in a declarative way (YAML file).
FTR, the snippet below was automatically generated from the following docker run command, using the accompanying webapp https://composerize.com/:
docker run -it -p 4000:4000 bitgosdk/express:latest
version: ‘3.3’ services: express: ports: – ‘4000:4000’ image: ‘bitgosdk/express:latest’
I omitted the CMD arguments –disablessl -e test on-purpose, as composerize does not seem to support these extra arguments. This may sound like a bug (and FTR a related issue is opened), but meanwhile it might just be viewed as a feature, in line of @DavidMaze’s comment…