{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/docker/issues/635","repository_url":"https://api.github.com/repos/jenkinsci/docker","labels_url":"https://api.github.com/repos/jenkinsci/docker/issues/635/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/docker/issues/635/comments","events_url":"https://api.github.com/repos/jenkinsci/docker/issues/635/events","html_url":"https://github.com/jenkinsci/docker/issues/635","id":294233500,"node_id":"MDU6SXNzdWUyOTQyMzM1MDA=","number":635,"title":"Separate volume mounts","user":{"login":"rahulsom","id":193047,"node_id":"MDQ6VXNlcjE5MzA0Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/193047?v=4","gravatar_id":"","url":"https://api.github.com/users/rahulsom","html_url":"https://github.com/rahulsom","followers_url":"https://api.github.com/users/rahulsom/followers","following_url":"https://api.github.com/users/rahulsom/following{/other_user}","gists_url":"https://api.github.com/users/rahulsom/gists{/gist_id}","starred_url":"https://api.github.com/users/rahulsom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahulsom/subscriptions","organizations_url":"https://api.github.com/users/rahulsom/orgs","repos_url":"https://api.github.com/users/rahulsom/repos","events_url":"https://api.github.com/users/rahulsom/events{/privacy}","received_events_url":"https://api.github.com/users/rahulsom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-04T21:41:29Z","updated_at":"2018-09-09T18:31:10Z","closed_at":null,"author_association":"NONE","body":"When I run this command:\r\n\r\n```bash\r\ndocker run --rm \\\r\n    -p 8080:8080 \\\r\n    -p 50000:50000 \\\r\n    -v $(pwd):/var/jenkins_home \\\r\n    jenkins/jenkins:alpine\r\n```\r\n\r\nThis is what my working directory looks like\r\n\r\n```\r\nconfig.xml\r\ncopy_reference_file.log\r\nhudson.model.UpdateCenter.xml\r\nhudson.plugins.git.GitTool.xml\r\nidentity.key.enc\r\ninit.groovy.d\r\njenkins.CLI.xml\r\njenkins.install.InstallUtil.lastExecVersion\r\njenkins.install.UpgradeWizard.state\r\njobs\r\nlogs\r\nnodeMonitors.xml\r\nnodes\r\nplugins\r\nqueue.xml\r\nsecret.key\r\nsecret.key.not-so-secret\r\nsecrets\r\nupdates\r\nuserContent\r\nusers\r\nwar\r\nworkflow-libs\r\n```\r\n\r\nThere is a whole lot going on there.\r\n`users` contains user preferences.\r\n`jobs` contains job logs and settings.\r\n`logs` contains jenkins logs.\r\nAlmost everything else can be considered part of jenkins configuration.\r\n\r\nWhen building immutable images, the jenkins configuration is unlikely to change.\r\n\r\nIt is perhaps a better idea to create separate volume mounts for `users`, `jobs`, and `logs`."},"comment":{"url":"https://api.github.com/repos/jenkinsci/docker/issues/comments/419735268","html_url":"https://github.com/jenkinsci/docker/issues/635#issuecomment-419735268","issue_url":"https://api.github.com/repos/jenkinsci/docker/issues/635","id":419735268,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTczNTI2OA==","user":{"login":"batmat","id":223853,"node_id":"MDQ6VXNlcjIyMzg1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/223853?v=4","gravatar_id":"","url":"https://api.github.com/users/batmat","html_url":"https://github.com/batmat","followers_url":"https://api.github.com/users/batmat/followers","following_url":"https://api.github.com/users/batmat/following{/other_user}","gists_url":"https://api.github.com/users/batmat/gists{/gist_id}","starred_url":"https://api.github.com/users/batmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batmat/subscriptions","organizations_url":"https://api.github.com/users/batmat/orgs","repos_url":"https://api.github.com/users/batmat/repos","events_url":"https://api.github.com/users/batmat/events{/privacy}","received_events_url":"https://api.github.com/users/batmat/received_events","type":"User","site_admin":false},"created_at":"2018-09-09T18:31:10Z","updated_at":"2018-09-09T18:31:10Z","author_association":"MEMBER","body":"And also, `-v $(pwd):/var/jenkins_home \\`: please do not use \"bind-mounts\". This is not a Jenkins specific issue, use volumes, always.\r\nI've written https://batmat.net/2018/09/07/how-to-run-and-upgrade-jenkins-using-the-official-docker-image/ yesterday in case you don't know what to do. HTH"}}
{"actor":{"display_login":"batmat"}}