Skip to content

Commit

Permalink
Development: Fix docker command in Jenkins development setup (#7585)
Browse files Browse the repository at this point in the history
  • Loading branch information
reschandreas authored Dec 9, 2023
1 parent 1f2f2e2 commit 7fc22a5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 0 additions & 1 deletion docker/jenkins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ services:
- ./jenkins/master-key-only-for-testing.key:/var/jenkins_home/master.key # Preset master key to use pre-generated secrets
- ./jenkins/jenkins-casc-config.yml:/usr/share/jenkins/ref/jenkins-casc-config.yml:ro
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker:ro
ports:
- "8082:8080"
# expose the port to make it reachable docker internally even if the external port mapping changes
Expand Down
12 changes: 12 additions & 0 deletions docker/jenkins/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,16 @@ RUN jenkins-plugin-cli --plugin-file /usr/share/jenkins/ref/plugins.yml
# (Uncomment this line if you're using jenknis-casc-config.yml for auto-configuration)
# ENV JAVA_OPTS -Djenkins.install.runSetupWizard=false

# setup docker
RUN apt-get update -y \
&& apt-get install -qqy apt-transport-https ca-certificates curl gnupg2 software-properties-common
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
RUN add-apt-repository \
"deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
RUN apt-get update -y \
&& apt-get -y install docker-ce && rm -rf /var/apt/cache/*
RUN usermod -aG docker jenkins

USER jenkins

0 comments on commit 7fc22a5

Please sign in to comment.