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

Optimise Docker image #56

Closed
2 tasks done
dragarcia opened this issue Jul 9, 2021 · 1 comment
Closed
2 tasks done

Optimise Docker image #56

dragarcia opened this issue Jul 9, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request v13.3.0

Comments

@dragarcia
Copy link
Contributor

dragarcia commented Jul 9, 2021

At the moment, we are building the Docker image differently from the cloud images via a Dockerfile. This is starting to be a hassle to update separately every time. Also, the compressed size of the latest image is 723.42 MB , which is getting out of hand. Downloaded image stands at 1.76 GB.


Attempt the following :

  • Build the image through Ansible and make use of existing task files.
  • Reduce and minimise final image size. (somewhat)
    • Remove packages that are only used for building.
    • Make sure downloaded files are also cleaned up at the end.
@dragarcia dragarcia added enhancement New feature or request v13.3.0 labels Jul 9, 2021
@dragarcia dragarcia self-assigned this Jul 9, 2021
dragarcia added a commit that referenced this issue Jul 10, 2021
- and existing task files
dragarcia added a commit that referenced this issue Jul 10, 2021
@dragarcia
Copy link
Contributor Author

Build the image through Ansible and make use of existing task files.

Was able to achieve this and produce a working docker image. This definitely simplifies and streamlines the Docker image building process with the rest. Wiki has been updated.


Reduce and minimise final image size.

The size of the new image stands at 1.8 GB uncompressed, but now at 675.92 MB compressed. Actually increased in size for the uncompressed version but decreased for the compressed one. One thing to note is that all changes are now found in a single layer as opposed to multiple ones. For subsequent rounds of size optimization, the builds of the following images should be focused on:

  • PostGIS
  • pljava
  • plv8

Also attempted to use the alpine version of PostgreSQL. However, this version does not have apt installed. This forces us to write new tasks specifically to not use apt and therefore defeats the purpose of streamlining in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v13.3.0
Projects
None yet
Development

No branches or pull requests

1 participant