Still new to Docker. I have created a WSO2 docker image successfully using instructions available here.
I would like to run it (wso2am:2.0.0
) with a custom CSS file. I am doing some reading, but I am facing issues.
docker run wso2am:2.0.0
.wso2am
at /home/me/Desktop/some-path
and put my css file in the proper directory. I am under Ubuntu 14.I am facing two issues:
I would like to run my wso2am
image with my directory structure on top of it, but without making a permanent change to my wso2am
image files. That is, if I stop the container/image, it does not matter if the copied files from my directory structure are not persisted. What is the exact command to perform?
The Docker documentation often mentions -t -i
as options to access the container. However, when I launch docker run -it wso2am:2.0.0 bash
, I don't get a shell access to explore the directory structure of my container. It just dumps all debug statements (the log). Why?
Remark
Regarding 1., it does not seem like the right to proceed. I should make a copy of my Dockerfile
and add instructions to copy my extra files, then build an image.
You can try the below command. This will give you shell access to a running container.
docker exec -it <CONTAINER_ID> /bin/bash
To get the CONTAINER_ID issue docker ps
command first which will list down all running containers with their CONTAINER_IDs.
The reason it dumps logs when you execute with -i -t
is that it starts the carbon server during the docker run
in foreground. Therefore, you cannot execute any other shell commands in this mode. I am assuming that you might have configured this way in your docker file. Share your dockerfile if this doesn't answer the question.
Are you using dockerfiles from WSO2 docker repository?