Use docker to Install jenkin
The operation command is as follows
Docker run: This step mounts tomcat/jdk/maven installed on the host into the container
Docker exec enters the container to see the mounted directory.
The questions are as follows
1: jenkins with browser open, configure paths such as tomcat and maven, which refer to the liunx host path or the mounted path in the container
2: If after the host tomcat directory is mounted in the container, I find that the host tomcat needs to be replaced, then how to update the tomcat version in the container. Before, I used docker stop ,docker rm, and docker run to mount the new path. This led me to need to reconfigure jenkins on the web page.
3: The directory mounted in the container has no operation permission. Through ls -l, it is found that the mounted directory user and user group are both root and only the user has rwx permission, and the user group and others do not have any permission. I want to use sudo to switch the administrator account and find that there is no permission. how can I get the permission to change the configuration file inside?
4. Seek a docker Communication Group
- Is the path inside the container
- Tomcat configurations are the same between versions, so in-situ replacement is fine, and jenkins should not need reconfiguration.
- It is possible to modify the user and group to which the directory on the host belongs, so that the user Id and group Id of the file after mounting will be the same as those on the host, and generally sudo is not required to perform specific operations.