Open
Conversation
Owner
|
Good work. As your next assignment, I would like you to harden the image. |
Author
|
Cool thanks, let me research on it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reduced size of docker image by
multistage builds - This involves using multiple FROM instructions in my Dockerfile, where each FROM instruction starts a new stage with a new base image. This allows me to use different base images for different stages of your build process and copy only the necessary files from each stage.
use of Alpine base image: Used a smaller base image, such as Alpine Linux, for my Docker image. Alpine Linux is known for its small size and can significantly reduce the size of my image compared to using a larger base image like Ubuntu.
Reduce layers: Tried to reduce the number of layers in my image by combining multiple RUN instructions into a single RUN instruction. This is done by chaining commands together using && in a single RUN instruction.
Cleanup: Remove any unnecessary files or dependencies after they are no longer needed. For example, I removed the node_modules directory after running npm install to reduce the size of the final image.