Skip to content

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.

@david30907d david30907d force-pushed the refactor-dockerfile branch from f91ab7c to a0caca0 Compare August 6, 2020 01:48
@david30907d david30907d force-pushed the refactor-dockerfile branch from 1daf666 to 0d9386f Compare August 6, 2020 06:12
@david30907d david30907d force-pushed the refactor-dockerfile branch from 9b6c1ed to bd22c28 Compare August 6, 2020 07:05
@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.

1 participant