Sign inSign up

escaletech/gke-cd-with-docker-compose

By escaletech

Updated about 7 years ago

Image
0

312

escaletech/gke-cd-with-docker-compose repository overview

Continuous Deployment for Google Kubernetes Engine with docker compose

This image packs what is typically necessary for deploying services to Google Kubernetes Engine and adds docker compose for e2e and integration tests.

Limitations: The docker-compose.yml can't mount volumes. Since we'll be using a docker-in-docker approach, i.e. running docker-compose inside a docker container, the DOCKER_HOST of the inner container is the same of the most outter container. In other words, when assembling the volumes of your docker-compose, Docker will look for directories on the host machine, not in the container.

Example Circle CI configuration

version: 2
jobs:
  build:
    docker:
      - image: circleci/node:8
    steps:
      - checkout
      - run: npm install
      - run: npm run build
      - run:
          name: Move files to workspace
          command: 'set -exu && mkdir -p /tmp/workspace && mv dist node_modules /tmp/workspace'
      - persist_to_workspace:
          root: /tmp/workspace
          paths: [ dist, node_modules ]

  test:e2e:
    docker:
      - image: escaletech/gke-cd-with-docker-compose
    environment:
      ENV: production
      GKE_PROJECT: the-project-name
      GKE_ZONE: us-east1-b
      GKE_CLUSTER: your-cluster-name
    steps:
      - checkout
      - setup_remote_docker
      - run: gcloud-setup.sh # Setup gcloud authentication and configuration
      - attach_workspace:
          at: /tmp/workspace
      - run:
          name: Restore workspace
          command: 'set -exu && mv /tmp/workspace/dist /tmp/workspace/node_modules .'
      - run: gcloud auth configure-docker # Authenticate docker with GCloud credentials
      - run: docker-compose up test:e2e

Tag summary

Content type

Image

Digest

Size

151.8 MB

Last updated

about 7 years ago

docker pull escaletech/gke-cd-with-docker-compose