Skip to content

Commit

Permalink
In Docker, {app,probe} -> {scope-app,scope-probe}
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbourgon committed Jun 29, 2015
1 parent 6978549 commit 40a25ec
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ coverage.html
scope.tar
scope_ui_build.tar
app/app
app/scope-app
probe/probe
docker/app
docker/probe
probe/scope-probe
docker/scope-app
docker/scope-probe
experimental/bridge/bridge
experimental/demoprobe/demoprobe
experimental/fixprobe/fixprobe
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
SUDO=sudo
DOCKER_SQUASH=$(shell which docker-squash)
DOCKERHUB_USER=weaveworks
APP_EXE=app/app
PROBE_EXE=probe/probe
APP_EXE=app/scope-app
PROBE_EXE=probe/scope-probe
FIXPROBE_EXE=experimental/fixprobe/fixprobe
SCOPE_IMAGE=$(DOCKERHUB_USER)/scope
SCOPE_EXPORT=scope.tar
Expand All @@ -17,7 +17,8 @@ all: $(SCOPE_EXPORT)

$(SCOPE_EXPORT): $(APP_EXE) $(PROBE_EXE) docker/*
@if [ -z '$(DOCKER_SQUASH)' ]; then echo "Please install docker-squash by running 'make deps'." && exit 1; fi
cp $(APP_EXE) $(PROBE_EXE) docker/
cp $(APP_EXE) docker/scope-app
cp $(PROBE_EXE) docker/scope-probe
$(SUDO) docker build -t $(SCOPE_IMAGE) docker/
$(SUDO) docker save $(SCOPE_IMAGE):latest | sudo $(DOCKER_SQUASH) -t $(SCOPE_IMAGE) | tee $@ | $(SUDO) docker load

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /home/weave
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/testing" >>/etc/apk/repositories && \
apk add --update runit conntrack-tools && \
rm -rf /var/cache/apk/*
COPY ./app ./probe ./entrypoint.sh /home/weave/
COPY ./scope-app ./scope-probe ./entrypoint.sh /home/weave/
COPY ./run-app /etc/service/app/run
COPY ./run-probe /etc/service/probe/run
EXPOSE 4040
Expand Down
4 changes: 2 additions & 2 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ while true; do
done

mkdir -p /etc/weave
echo "$APP_ARGS" >/etc/weave/app.args
echo "$PROBE_ARGS" >/etc/weave/probe.args
echo "$APP_ARGS" >/etc/weave/scope-app.args
echo "$PROBE_ARGS" >/etc/weave/scope-probe.args

if [ -n "$DNS_SERVER" -a -n "$SEARCHPATH" ]; then
echo "domain $SEARCHPATH" >/etc/resolv.conf
Expand Down
2 changes: 1 addition & 1 deletion docker/run-app
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

exec /home/weave/app $(cat /etc/weave/app.args) $(cat /etc/weave/probes)
exec /home/weave/scope-app $(cat /etc/weave/scope-app.args) $(cat /etc/weave/probes)
2 changes: 1 addition & 1 deletion docker/run-probe
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

exec /home/weave/probe $(cat /etc/weave/probe.args)
exec /home/weave/scope-probe $(cat /etc/weave/probe.args)

0 comments on commit 40a25ec

Please sign in to comment.