Style docker files consistently #107
ivanperez-keera
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I just noticed that docker files are not indented very consistently. For example, here the
&&start a column zero:https://github.com/space-ros/docker/blob/76cd412a7379dd5a5ec338b7b75659afbbf0c9a1/space_robots/Dockerfile#L81-L83
but just a little bit later, they start at column 2:
https://github.com/space-ros/docker/blob/76cd412a7379dd5a5ec338b7b75659afbbf0c9a1/space_robots/Dockerfile#L87
I've always found that keeping a consistent style helps catch errors and propagate updates.
The following extra vertical space is not needed (and double space is not used elsewhere):
https://github.com/space-ros/docker/blob/76cd412a7379dd5a5ec338b7b75659afbbf0c9a1/space_robots/Dockerfile#L65
The following invocations of
apt-getpasses the argument-ylast:https://github.com/space-ros/docker/blob/76cd412a7379dd5a5ec338b7b75659afbbf0c9a1/space_robots/Dockerfile#L67
https://github.com/space-ros/docker/blob/76cd412a7379dd5a5ec338b7b75659afbbf0c9a1/space_robots/Dockerfile#L70
Others pass it first:
https://github.com/space-ros/docker/blob/76cd412a7379dd5a5ec338b7b75659afbbf0c9a1/space_robots/Dockerfile#L47
IMO the latter is preferable because it conveys the important information sooner and is less likely to be removed by mistake.
All reactions