LanikSJ / dfimage

Reverse-engineer a Dockerfile from a Docker image.
https://laniksj.github.io/dfimage/
MIT License
355 stars 51 forks source link

🐛 [BUG] - RUN prefix on each command if multi stage build is used #251

Closed sino1641 closed 4 months ago

sino1641 commented 4 months ago

Description

RUN prefix on each command if multi stage build is used

Snipaste_2024-05-04_14-25-08

Also, it seems #155 still exists here.

Docker Config

Client:
 Version:           25.0.3
 API version:       1.44
 Go version:        go1.20.12
 Git commit:        4debf41
 Built:             Mon Feb 12 00:00:00 2024
 OS/Arch:           linux/amd64
 Context:           default

Server:
 Engine:
  Version:          25.0.3
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.20.12
  Git commit:       f417435
  Built:            Mon Feb 12 00:00:00 2024
  OS/Arch:          linux/amd64
  Experimental:     false

Reproduction steps

docker run -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/laniksj/dfimage portainer/portainer-ce:latest

Screenshots

No response

Logs

No response

OS

Linux

LanikSJ commented 4 months ago

I think it's coming from here: https://github.com/LanikSJ/dfimage/blob/20ca8a13df3f421257b039d73c8fc0a7e8d71f31/entrypoint.py#L79-L82

I'll have to try some stuff as I'm not that good with Python unfortunately.