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

Update base images of 3 2 2 #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

OlegPhenomenon
Copy link
Contributor

@OlegPhenomenon OlegPhenomenon commented Aug 15, 2023

What did I do?

  1. Implemented a multi-layered architecture for the base image.
  2. Updated the postgres-client.
  3. Added the RUBY-VER argument.
  4. Added the refactor suffix, so the refactored image tag looks like internetee/ruby:3.2.2-refactor.

Why did I do it?

  • The postgres-client update was associated with different versions of the current database and client. Both in production and development, version 13 is used, so it was decided to update the client version.
  • Multi-layer architecture is an approach that reduces the size of Docker images. When necessary libraries are compiled on one layer, their executables are transferred to the next layer, while the original sources of these libraries "disappear" on the old layer.
  • ARG RUBY_VER was added so that it would be easy to handle Ruby versions when there's an update. It's also considered good practice to store versions in a separate variable, making that variable a single source of truth.
  • I added the refactor suffix in case there's a need to use the old version of the image. When it's time to update the Ruby version, the refactor suffix will be removed.

How to test?
For the Dockerfile responsible for deployment in a test environment, you need to change the base image to: internetee/ruby:3.2.2-refactor, and rebuild it. Since only our auction runs in Docker Swarm, I think this change mainly concerns the auction. I created a specific PR internetee/auction_center#1103, in which the updated Dockerfiles are located. If in the test environment the images don't crash, then I believe it's ready to merge. The changes in the Dockerfile related to the auction can be read in the PR description.

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.

1 participant