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

2021-04-14 - Timestamp suggestion and correction for buildkit.dockerfile #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

faustobranco
Copy link

@faustobranco faustobranco commented Apr 14, 2021

Timestamp of command:
Adds an option, as an optional argument in the call to dedockfy.py to print the original date of the command.
This makes it easier to visually find a date break between commands, which usually means that from there it is another image, probably the FROM of the image being analyzed.
Example:

# Created At: 2021-03-12 11:03:14
COPY file:c432ff61c4993ecdef4786f48d91a96f8f0707f6179816ccb98db661bfb96b90 in /usr/local/bin/

# Created At: 2021-03-12 11:03:14
EXPOSE 80

# Created At: 2021-03-12 11:03:15
CMD ["httpd-foreground"]

# Created At: 2021-03-17 14:21:48
USER root

# Created At: 2021-03-17 14:21:48
RUN /bin/sh -c apk update # buildkit

# Created At: 2021-03-17 14:21:50
RUN /bin/sh -c apk add python3 py3-pip sqlite apache2-mod-wsgi # buildkit

Correction to buildkit.dockerfile
A correction has been added, since images generated by "buildkit.dockerfile" (Git / Docker Hub) do not have the "# (nop)" statement in the command lines, causing the current code to duplicate the prefix "RUN".
Example:

RUN RUN / bin / sh -c echo 'Include conf / extra / reaper_portal.conf' >> /usr/local/apache2/conf/httpd.conf # buildkit

Or include RUN where it shouldn't:

RUN EXPOSE map [80 / tcp: {}]

@faustobranco faustobranco changed the title 2021-14-08 - Timestamp suggestion and correction for buildkit.dockerfile 2021-04-14 - Timestamp suggestion and correction for buildkit.dockerfile Apr 14, 2021
@johndpope
Copy link

merge

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

2 participants