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

Simplify docker, shrink production image size! #409

Merged
merged 9 commits into from
Sep 25, 2021
Merged

Conversation

epugh
Copy link
Member

@epugh epugh commented Sep 16, 2021

Description

Motivation and Context

How Has This Been Tested?

Screenshots or GIFs (if appropriate):

Types of changes

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] Improvement (non-breaking change which improves existing functionality)
  • [] New feature (non-breaking change which adds new functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [] My code follows the code style of this project.
  • [] My change requires a change to the documentation.
  • [] I have updated the documentation accordingly.
  • [] I have read the CONTRIBUTING document.
  • [] I have added tests to cover my changes.
  • [] All new and existing tests passed.

@epugh epugh temporarily deployed to quepid-pr-409 September 16, 2021 10:52 Inactive
@epugh
Copy link
Member Author

epugh commented Sep 16, 2021

By only copying over directories INTO the prod image I go from 2.42 GB to 1.83 GB.

With buster-slim and apt-get install mariadb-server libmariadbclient-dev mariadb-client mysql-common ruby-mysql2 libmariadbd-dev build-essential patch ruby-dev zlib1g-dev liblzma-dev gnupg I get down to 1.75GB in size.

@epugh epugh temporarily deployed to quepid-pr-409 September 16, 2021 10:53 Inactive
@epugh epugh temporarily deployed to quepid-pr-409 September 16, 2021 11:10 Inactive
@epugh
Copy link
Member Author

epugh commented Sep 18, 2021

@worleydl in a brand new version of Quepid, i ran into the tmp/pids issue too, so this PR is needed!

14:02:58 web.1 | bundler: failed to load command: puma (/usr/local/bundle/bin/puma)
14:02:58 web.1 | Errno::ENOENT: No such file or directory @ rb_sysopen - tmp/pids/server.pid
14:02:58 web.1 | /usr/local/bundle/gems/puma-5.4.0/lib/puma/launcher.rb:247:in write' 14:02:58 web.1 | /usr/local/bundle/gems/puma-5.4.0/lib/puma/launcher.rb:247:in write_pid'
14:02:58 web.1 | /usr/local/bundle/gems/puma-5.4.0/lib/puma/launcher.rb:111:in write_state' 14:02:58 web.1 | /usr/local/bundle/gems/puma-5.4.0/lib/puma/cluster.rb:398:in run'
14:02:58 web.1 | /usr/local/bundle/gems/puma-5.4.0/lib/puma/launcher.rb:181:in run' 14:02:58 web.1 | /usr/local/bundle/gems/puma-5.4.0/lib/puma/cli.rb:80:in run'
14:02:58 web.1 | /usr/local/bundle/gems/puma-5.4.0/bin/puma:10:in <top (required)>' 14:02:58 worker.1 | 2021-09-18T14:02:58.896Z pid=9 tid=6fd INFO: See LICENSE and the LGPL-3.0 for licensing details. 14:02:58 web.1 | /usr/local/bundle/bin/puma:23:in load'

@epugh epugh changed the title WIP: Simplify docker Simplify docker, shrink production image size! Sep 25, 2021
@epugh epugh merged commit 19c4a90 into master Sep 25, 2021
@epugh
Copy link
Member Author

epugh commented Sep 25, 2021

So, this PR dropped the size by a GB!

➜ quepid git:(simplify_docker) docker images | grep quepid
o19s/quepid 6.8.0-practice 377d3bcb847d 17 minutes ago 1.48GB
o19s/quepid latest 377d3bcb847d 17 minutes ago 1.48GB
quepid_app latest 91050fe950ac 46 minutes ago 1.44GB
o19s/quepid 6.7.0 16bb81fe58af 4 weeks ago 2.42GB

@epugh epugh deleted the simplify_docker branch January 8, 2022 12:59
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