uber-archive / makisu

Fast and flexible Docker image building tool, works in unprivileged containerized environments like Mesos and Kubernetes.
Apache License 2.0
2.41k stars 156 forks source link

Restore env after running stages #315

Closed Rowern closed 4 years ago

Rowern commented 4 years ago

Is your feature request related to a problem? Please describe.

When running makisu, environment variables might get overwitten by the image creation process.

Describe the solution you'd like

Makisu should save and restore the env between stage.
From what I see:

Describe alternatives you've considered

It is possible to bypass this bug by specifying your env vars as ENV command in your Dockerfile but its unclean

Additional context

This might be the root cause of all the SSL certs issues. if the SSL_CERT_DIR is overwritten by an image (from pull or in creation), makisu will not be able to use the one provided by the original env.

Rowern commented 4 years ago

I'm starting a PR as soon as I have a workaround for this.

While testing, I found that makisu does not support this: https://github.com/moby/moby/issues/37345#issuecomment-400245466