/circleci-2.0-beta-docker-example

An example project for building docker images on CircleCI 2.0 Beta

Primary LanguageJavaScriptMIT LicenseMIT

circleci-2.0-beta-docker-example

This is an example project for building Docker images on CircleCI 2.0 Beta. This project covers:

Development Setup

The example application in this project is fairly simple. To launch the app, just run:

$ docker-compose up

Then, you will get Hello World! if you curl localhost:8000.

Amazon EC2 Container Registry Setup

  1. Create an AWS account and an IAM user with enough permissions

  2. Move to terraform directory

    $ cd terraform
  3. Copy terraform.tfvars.example to terraform.tfvars and fill in values

  4. Run terraform command

    $ terraform plan && terraform apply

CircleCI Setup

You need to set the following environment variables on CircleCI UI:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_DEFAULT_REGION
  • ECR_ENDPOINT: e.g. <ACCOUNT-ID>.dkr.ecr.ap-northeast-1.amazonaws.com

License

Copyright © 2017 Naoto Yokoyama

Distributed under the MIT license. See the LICENSE file for full details.