diff --git a/Dockerfile b/Dockerfile index 80d1de77e80..8ffbcef93c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,7 +66,7 @@ CMD dockerize -template /etc/cadence/config/config_template.yaml:/etc/cadence/co # All-in-one Cadence server -FROM cadence-server AS cadence-allinone +FROM cadence-server AS cadence-auto-setup RUN apk add --update --no-cache ca-certificates py-pip mysql-client RUN pip install cqlsh diff --git a/docker/README.md b/docker/README.md index 193971af8df..2def7de3f5c 100644 --- a/docker/README.md +++ b/docker/README.md @@ -40,8 +40,9 @@ Building an image for any branch and restarting ----------------------------------------- Replace **YOUR_TAG** and **YOUR_CHECKOUT_BRANCH** in the below command to build: ``` -cd $GOPATH/src/github.com/uber/cadence/docker -docker build . -t ubercadence/server:YOUR_TAG --build-arg git_branch=YOUR_CHECKOUT_BRANCH +cd $GOPATH/src/github.com/uber/cadence +git checkout YOUR_CHECKOUT_BRANCH +docker build . -t ubercadence/server:YOUR_TAG --build-arg TARGET=auto-setup ``` Replace the tag of **image: ubercadence/server** to **YOUR_TAG** in docker-compose.yml . Then stop service and remove all containers using the below commands. diff --git a/docker/docker-compose-es.yml b/docker/docker-compose-es.yml index 99a068b7fa0..41c1c83feb0 100644 --- a/docker/docker-compose-es.yml +++ b/docker/docker-compose-es.yml @@ -32,6 +32,8 @@ services: environment: - discovery.type=single-node cadence: + # TODO https://github.com/uber/cadence/issues/2330 + # after fixing the ES container, need to use the new image: server:master-auto-setup image: ubercadence/server-es:master ports: - "7933:7933" diff --git a/docker/docker-compose-mysql.yml b/docker/docker-compose-mysql.yml index 335708d245c..051cb2ecd01 100644 --- a/docker/docker-compose-mysql.yml +++ b/docker/docker-compose-mysql.yml @@ -14,7 +14,7 @@ services: - "8125:8125" - "8126:8126" cadence: - image: ubercadence/server:0.6.0 + image: ubercadence/server:master-auto-setup ports: - "7933:7933" - "7934:7934" diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 3f42ce8342a..2f2f4c5a6d7 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -12,7 +12,7 @@ services: - "8125:8125" - "8126:8126" cadence: - image: ubercadence/server:0.6.0 + image: ubercadence/server:master-auto-setup ports: - "7933:7933" - "7934:7934" diff --git a/scripts/buildkite/docker-push.sh b/scripts/buildkite/docker-push.sh index b1496f9d91a..093a70b28f3 100755 --- a/scripts/buildkite/docker-push.sh +++ b/scripts/buildkite/docker-push.sh @@ -17,12 +17,13 @@ if [ "$BUILDKITE_COMMIT" != "$MASTER_SHA" ]; then exit 0 fi -cd docker - echo "Building docker image for $BUILDKITE_MESSAGE" -docker build . -f Dockerfile -t ubercadence/server:master --build-arg git_branch=$BUILDKITE_COMMIT +docker build . -f Dockerfile -t ubercadence/server:master --build-arg TARGET=server docker push ubercadence/server:master -docker build . -f Dockerfile-cli -t ubercadence/cli:master --build-arg git_branch=$BUILDKITE_COMMIT +docker build . -f Dockerfile -t ubercadence/server:master-auto-setup --build-arg TARGET=auto-setup +docker push ubercadence/server:master-auto-setup + +docker build . -f Dockerfile-cli -t ubercadence/cli:master --build-arg TARGET=cli docker push ubercadence/cli:master