Ubuntu 16.04 LTS (Xenial)
Docker (latest version)
Cyclos 4.8 Docker image
Docker provides a mechanism, through the Docker CLI, for admins to access a Docker terminal shell within a container where the user can utilize the vi text editor to make the edits to the server.xml file which is located in the /usr/local/tomcat/conf folder. In order to access the container the user will need the docker container id. This can be obtained by entering
Code: Select all
$ sudo docker ps
at the command prompt (assuming you are not operating as root which is highly recommended).This will give the user some output on the running Docker containers including the container id. Once you obtain the container id, the next step is to enter the container and get a command prompt.
Code: Select all
$ sudo docker exec -it <container id> sh
I got an error using bash but I was successful just getting a shell (sh).
Once you are at the Docker command prompt (#) you can cd to the /usr/local/tomcat/conf directory and issue a list contents command
Code: Select all
# ls -a
Code: Select all
# vi server.xml
Here is a helpful link https://www.cs.colostate.edu/helpdocs/vi.html for vi commands.