I'm seeing below error while running ubuntu-docker image that I built using following Dockerfile. Need some advice what am I missing here:

Dockerfile :

FROM scratch ADD https://partner-images.canonical.com/core/bionic/current/ubuntu-bionic-core-cloudimg-amd64-root.tar.gz / ENTRYPOINT ["/bin/bash"]

$ docker run -it --entrypoint /bin/bash d36318a56ad3

/usr/bin/docker-current: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting contaiused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory"\n".

1 Answer 1


instead of using https link to the tar.gz file

download the tar.gz file locally

and do an add with the local file

wget https://partner-images.canonical.com/core/bionic/current/ubuntu-bionic-core-cloudimg-amd64-root.tar.gz

and Dockerfile starts with

FROM scratch
ADD ubuntu-bionic-core-cloudimg-amd64-root.tar.gz /
  • docker ADD untars the file only if it's local : docs.docker.com/engine/reference/builder/#add - quote "if <src> is a local tar archive in a recognized compression format (identity, gzip, bzip2 or xz) then it is unpacked as a directory. Resources from remote URLs are not decompressed. "
    – Koen
    Dec 22, 2020 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.