Skip to content

Commit 9df95a1

Browse files
authored
Merge pull request #70 from jglick/demo-updates
Demo tweaks
2 parents 7354b1c + a002ae6 commit 9df95a1

File tree

5 files changed

+5
-14
lines changed

5 files changed

+5
-14
lines changed

demo/Dockerfile

+2-10
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,10 @@
2222
# THE SOFTWARE.
2323
##
2424

25-
FROM jenkinsci/workflow-demo:2.3
25+
FROM jenkinsci/workflow-demo:2.4
2626

2727
USER root
2828

29-
RUN apt-get update
30-
RUN apt-get install -y sudo
31-
RUN adduser jenkins sudo
32-
RUN echo 'Defaults !authenticate' >> /etc/sudoers
33-
34-
# Minimum for docker-workflow. Docker server does not accept a client newer than itself (older is OK).
35-
RUN wget -O /usr/bin/docker --no-check-certificate https://get.docker.com/builds/Linux/x86_64/docker-1.4.0
36-
RUN chmod a+x /usr/bin/docker
37-
3829
ADD repo /tmp/repo
3930
RUN git config --global user.email "[email protected]" && git config --global user.name "Docker Workflow Demo" && cd /tmp/repo && git init && git add . && git commit -m 'demo'
4031

@@ -49,5 +40,6 @@ RUN /usr/local/bin/plugins.sh /tmp/files/plugins.txt
4940
ADD JENKINS_HOME /usr/share/jenkins/ref
5041

5142
COPY run-demo.sh /usr/local/bin/run-demo.sh
43+
ENV JAVA_OPTS -Djenkins.install.state=INITIAL_SECURITY_SETUP
5244

5345
CMD /usr/local/bin/run-demo.sh

demo/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ build-snapshot: build-proxy
4646
#
4747
# If using boot2docker, you need to tell your remote debugger to use the boot2docker VM ip (ala boot2docker ip).
4848

49-
DOCKER_RUN=docker run --rm -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock
49+
DOCKER_RUN=docker run --rm -p 127.0.0.1:8080:8080 -v $(shell which docker):/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock --group-add=$(shell stat -c %g /var/run/docker.sock)
5050

5151
run: build
5252
$(DOCKER_RUN) $(IMAGE):$(TAG)

demo/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This image contains a "Docker Pipeline" Job that demonstrates Jenkins Pipeline i
44
with Docker via [CloudBees Docker Pipeline](https://wiki.jenkins-ci.org/display/JENKINS/CloudBees+Docker+Pipeline+Plugin) plugin.
55

66
```
7-
docker run --rm -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock jenkinsci/docker-workflow-demo
7+
docker run --rm -p 127.0.0.1:8080:8080 -v $(which docker):/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock --group-add=$(stat -c %g /var/run/docker.sock) jenkinsci/docker-workflow-demo
88
```
99

1010
The "Docker Pipeline" Job simply does the following:

demo/plugins.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ docker-workflow:1.8
22
docker-commons:1.4.0
33
authentication-tokens:1.3
44
credentials:2.1.4
5+
icon-shim:2.0.3
56
xvnc:1.24

demo/run-demo.sh

-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
# THE SOFTWARE.
2525
##
2626

27-
sudo chmod a+rw /var/run/docker.sock
28-
2927
#
3028
# Install a private registry that can be used by the demo to push images to.
3129
#

0 commit comments

Comments
 (0)