Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for building Docker images in Circle CI as part of the CI process #133

Merged
merged 14 commits into from
Mar 8, 2021

Conversation

bhanutejags
Copy link
Contributor

@bhanutejags bhanutejags commented Feb 27, 2021

Changes for building Docker images in Circle CI, as part of the CI process, contains the following changes:

  • Regenerated the Master key.
  • Modified Dockerfile of treatment-database app to remove postgres dependencies, as these are meant to run with a MySQL Database, and removing unnecessary dependencies will reduce docker image size.
  • Modified Dockerfile of treatment-database app to make RAILS_MASTER_KEY an argument to the Docker image build instead of an environment variable. This helps separate the build time requirements from runtime requirements.
  • Added .dockerignore to make sure unnecessary files in the repo are not copied as part of the Docker build context.
  • Fixed AWS CLI Commands in Circle CI, for some reason the aws ecr get-login-password command was outputting 5 unnecessary characters in beginning before the actual output, fixed it for now by trimming those characters using a cut command.
  • Setting a Job level environment variable for AWS_DEFAULT_REGION.
  • Separating build and publish of Docker image into 2 jobs.
  • Renamed ruby2-6-6 job to build.
  • Uses CIRCLE_TAG variable if available for tagging the Docker image.
  • Refined IMAGE_TAG logic to pick up version properly from CIRCLE_TAG variable, if CIRCLE_TAG is of the form v0.1.0 then IMAGE_TAG will be 0.1.0.
  • Using a short SHA1 commit ID, instead of the full one to tag the Docker image.
  • Modified ci Circle CI Workflow to run publish-image stage only for qa branch.

…ocess, contains the following changes:

* Regenerated the Master key.
* Modified Dockerfile of treatment-database app to remove postgres dependencies, as these are meant to run with a MySQL Database, and removing unnecessary dependencies will reduce docker image size.
* Modified Dockerfile of treatment-database app to make `RAILS_MASTER_KEY` an argument to the Docker image build instead of an environment variable. This helps separate the build time requirements from runtime requirements.
* Added `.dockerignore` to make sure unnecessary files in the repo are not copied as part of the Docker build context.
…ocess, contains the following changes:

* Fixed AWS CLI Commands in Circle CI, for some reason the `aws ecr get-login-password` command was outputting 5 unnecessary characters in beginning before the actual output, fixed it for now by trimming those characters using a `cut` command.
…ocess, contains the following changes:

* Using a short SHA1 commit ID, instead of the full one to tag the Docker image.
…ocess, contains the following changes:

* Using a short SHA1 commit ID, instead of the full one to tag the Docker image.
…ocess, contains the following changes:

* Using a short SHA1 commit ID, instead of the full one to tag the Docker image.
* Uses CIRCLE_TAG variable if available for tagging the Docker  image.
…ocess, contains the following changes:

* Setting a Job level environment variable for `AWS_DEFAULT_REGION`.
…ocess, contains the following changes:

* Separating build and publish of Docker image into 2 jobs.
…ocess, contains the following changes:

* Separating build and publish of Docker image into 2 jobs.
…ocess, contains the following changes:

* Separating build and publish of Docker image into 2 jobs.
…ocess, contains the following changes:

* Renamed `ruby2-6-6` job to `build`.
…ocess, contains the following changes:

* Refined `IMAGE_TAG` logic to pick up version properly from `CIRCLE_TAG` variable, if `CIRCLE_TAG` is of the form `v0.1.0` then `IMAGE_TAG` will be `0.1.0`.
* Modified `ci` Circle CI Workflow to run `publish-image` stage only for `qa` branch.
@bhanutejags bhanutejags changed the title 128/docker containers build circleci Changes for building Docker images in Circle CI, as part of the CI process Feb 27, 2021
@bhanutejags bhanutejags changed the title Changes for building Docker images in Circle CI, as part of the CI process Changes for building Docker images in Circle CI as part of the CI process Feb 27, 2021
…ocess, contains the following changes:

* Using a short SHA1 commit ID, instead of the full one to tag the Docker image.
…ocess, contains the following changes:

* Added `rails db:seed` command to README.md.
* Modified `docker-compose.yml` to pass `RAIL_MASTER_KEY` as an argument to Docker build.
Copy link
Member

@hortongn hortongn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bhanutejags This looks great. Nice job.

@hortongn hortongn merged commit fe2409a into qa Mar 8, 2021
@hortongn hortongn deleted the 128/docker-containers-build-circleci branch March 8, 2021 01:24
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants