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

ADD Dockerfile command does not unpack tarballs #298

Open andrewshadura opened 4 years ago

andrewshadura commented 4 years ago

Describe the bug ADD tarball.tar.gz / is supposed to unpack the said tarball into the root. Instead, it just copies it into it.

To Reproduce The specific Dockerfile I ran into this at:

FROM scratch

ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8

ARG DEBIAN_FRONTEND=noninteractive

ARG OSPACK=debian.tar.gz
ADD ${OSPACK} /

RUN apt-get update

Here, debian.tar.gz is a minimal Debian rootfs tarball.

Expected behavior The tarball is unpacked, so that I can run commands using its contents.

Instead, I’m getting:

info    * Step 6/7 (modifyfs) : ADD debian.tar.gz /  (465a0d0c)
info    * Execute ADD debian.tar.gz /  (465a0d0c) took 91.261753ms
info    * Not committing step ADD debian.tar.gz /  (465a0d0c)
info    * Step 6/7 (modifyfs) : RUN apt-get update  (d6692f4c)
error   failed to execute build plan: execute stage: build stage 0: build node: do execute: execute step: cmd start: exec: "sh": executable file not found in $PATH
andrewshadura commented 4 years ago

Thanks, but it seems that PR only adds support for tar.gz but not plain tar archives or tar.bz2/tar.xz or tars compressed with other compressors.

-- Cheers, Andrej

On Wed, 11 Mar 2020, 22:01 Yiran Wang, notifications@github.com wrote:

Closed #298 https://github.com/uber/makisu/issues/298 via #309 https://github.com/uber/makisu/pull/309.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/uber/makisu/issues/298#event-3120508317, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACLQBM64OMTN3BKP6LNHSDRG73Z3ANCNFSM4KGQU4AQ .

yiranwang52 commented 4 years ago

Let me keep the issue open until they are all supported