I have a windows docker with all the software versions I need. On my computer I can run in powershwll:
$docker run -it myuser/mycontainer
and then I can work interactively on the container.
In CircleCI the powershell is not enabled to work interactively. The “-it” option does not work in the docker run command. What I was able to do was to include a script inside my container that runs when the container is executed in CircleCI. But this makes the modifications/updates dependent on re-generating the container.
The question is: Can I run the docker run command with any options that allow me to execute more commands within the CircleCI .yml file?
What I tried and it didn’t work is:
- run: |
docker login -u $DOCKER_USER -p $DOCKERHUB_PASSWORD
docker run myuser/mycontainer
echo “This command run in the container.”
echo “This command is no longer executed in the container.It runs on the host.”