Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing Jenkins inside Docker Container on macOS
[Captains-Bay]🚩 > mkdir jenkins
[Captains-Bay]🚩 > cd jenkins/
[Captains-Bay]🚩 > vi Dockerfile
Captains-Bay]🚩 > cat Dockerfile
FROM jenkins/jenkins:lts
USER root
RUN apt-get update && apt-get install net-tools -y
RUN groupadd docker && gpasswd -a jenkins docker
USER jenkins
[Captains-Bay]🚩 >
er):/usr/bin/docker:ro -v /var/run/docker.sock:/var/run/docker.sock -v ~/test/jenkins-vol:/var/jenkins_home --privileged=true jenkins
Unable to find image 'jenkins:latest' locally
latest: Pulling from library/jenkins
55cbf04beb70: Pull complete
1607093a898c: Pull complete
9a8ea045c926: Pull complete
d4eee24d4dac: Pull complete
c58988e753d7: Pull complete
794a04897db9: Pull complete
70fcfa476f73: Pull complete
0539c80a02be: Pull complete
54fefc6dcf80: Pull complete
911bc90e47a8: Pull complete
38430d93efed: Pull complete
7e46ccda148a: Pull complete
c0cbcb5ac747: Pull complete
35ade7a86a8e: Pull complete
aa433a6a56b1: Pull complete
841c1dd38d62: Pull complete
b865dcb08714: Pull complete
5a3779030005: Pull complete
12b47c68955c: Pull complete
1322ea3e7bfd: Pull complete
Digest: sha256:eeb4850eb65f2d92500e421b430ed1ec58a7ac909e91f518926e02473904f668
Status: Downloaded newer image for jenkins:latest
0bf0bfb4cc8a294ef5e2
[Captains-Bay]🚩 > docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0bf0bfb4cc8a jenkins "/bin/tini -- /usr/l…" 16 seconds ago Up 15 seconds 0.0.0.0:8080->8080/tcp, 0.0.0.0:50000->50000/tcp gallant_lichterman
[Captains-Bay]🚩 > curl localhost:8080
<html><head><meta http-equiv='refresh' content='1;url=/login?from=%2F'/><script>window.location.replace('/login?from=%2F');</script></head><body style='background-color:white; color:white;'>
Authentication required
<!--
You are authenticated as: anonymous
Groups that you are in:
Permission you need to have (but didn't): hudson.model.Hudson.Administer
-->
</body></html> [Captains-Bay]🚩 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.