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

<build>(docker): refactor our dockerfile according to best practice #51

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

Conversation

david30907d
Copy link
Contributor

@david30907d david30907d commented Aug 5, 2020

Do some dockerfile refactor according to official dockerfile_best-practices

The reason why these refactor are essential is that it's risky without locking the version of packages.

Here's what i've done in this PR:

  • --no-install-recommends and rm -rf /var/lib/apt/lists/* is highly recommended in production env to slim the image size

  • use a package manager as poetry to lock packages version

  • remove compiler, git and other redundant tools after BerryNet ./configure is done

  • Move the rest of python dependencies into poetry.lock

  • Because we use func 2>&1 | tee -a $LOG in configure, docker build would still finish successfully if there's an error happened in ./configure.

@grandpaul grandpaul self-requested a review August 16, 2020 04:31
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.

None yet

1 participant