Dedockify icon indicating copy to clipboard operation
Dedockify copied to clipboard

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

Open faustobranco opened this issue 4 years ago • 1 comments

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 avatar Apr 14 '21 12:04 faustobranco

merge

johndpope avatar Dec 06 '22 06:12 johndpope