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 Dockerfile for caching layers and change CMD to ENTRYPOINT #849

Merged
merged 1 commit into from
Jul 28, 2024

Conversation

catatsuy
Copy link
Member

This pull request includes several updates to the webapp/ruby/Dockerfile to improve Docker image build efficiency and ensure consistency in the application startup process.

Dockerfile Improvements:

  • Added Dockerfile syntax version declaration at the top of the file (#syntax=docker/dockerfile:1).
  • Implemented build cache mounts to speed up apt-get update and package installation (--mount=type=cache,target=/var/lib/apt,sharing=locked and --mount=type=cache,target=/var/cache/apt,sharing=locked).
  • Changed the way Gemfile and Gemfile.lock are copied to the Docker image to ensure they are in the correct directory before running bundle install.
  • Replaced CMD with ENTRYPOINT to ensure the application always starts with the specified command (bundle exec rackup -p 8000 -o 0.0.0.0).

@catatsuy catatsuy merged commit f77e9ad into master Jul 28, 2024
4 checks passed
@catatsuy catatsuy deleted the feature-update-dockerfile-cache-and-entrypoint branch July 28, 2024 10:10
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