Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/builtinnya/circleci-2.0-beta-docker-example
An example project for building docker images on CircleCI 2.0 Beta
https://github.com/builtinnya/circleci-2.0-beta-docker-example
Last synced: 2 months ago
JSON representation
An example project for building docker images on CircleCI 2.0 Beta
- Host: GitHub
- URL: https://github.com/builtinnya/circleci-2.0-beta-docker-example
- Owner: builtinnya
- License: mit
- Created: 2017-04-17T18:19:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-01-05T06:48:12.000Z (about 4 years ago)
- Last Synced: 2023-05-05T12:07:03.620Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 38.1 KB
- Stars: 52
- Watchers: 2
- Forks: 30
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# circleci-2.0-beta-docker-example
This is an example project for building Docker images on [CircleCI 2.0 Beta](https://circleci.com/beta-access/). This project covers:
- Building Docker images in Docker CI container
- Caching Docker image layers without using [potential premium feature](https://circleci.com/docs/2.0/docker-layer-caching/)
- Testing Docker images using [Docker Compose](https://docs.docker.com/compose/)
- Pushing Docker images to [Amazon EC2 Container Registry](https://aws.amazon.com/jp/ecr/)## Development Setup
The example application in this project is fairly simple. To launch the app, just run:
```bash
$ 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
```bash
$ cd terraform
```3. Copy `terraform.tfvars.example` to `terraform.tfvars` and fill in values
4. Run terraform command
```bash
$ 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. `.dkr.ecr.ap-northeast-1.amazonaws.com`## License
Copyright © 2017 Naoto Yokoyama
Distributed under the MIT license. See the [LICENSE](./LICENSE) file for full details.