Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]build image faild:Untar re-exec error: exit status 1: output: operation not supported #22192

Closed
vklonghml opened this issue Apr 20, 2016 · 6 comments

Comments

@vklonghml
Copy link

vklonghml commented Apr 20, 2016

Output of docker version:

(paste your output here)
Client:
 Version:      1.10.2
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   c3959b1
 Built:        Mon Feb 22 21:37:01 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.10.2
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   c3959b1
 Built:        Mon Feb 22 21:37:01 2016
 OS/Arch:      linux/amd64

Output of docker info:

Steps to reproduce the issue:

i want to build an ubuntu image(download from ubuntu website, version=15.04.img), using scratch method,
1.the content of Dockerfile is below:

FROM scratch
ADD . /
RUN mkdir /var/run/sshd
RUN rm Dockerfile
CMD [\"/usr/sbin/sshd\", \"-D\"]

2.execute command: docker build -t ubuntu-15.04.0203 .
3.then failed

Describe the results you received:

Step 1 : FROM scratch
 ---> 
Step 2 : ADD . /
Untar re-exec error: exit status 1: output: operation not supported

Additional information you deem important (e.g. issue happens only occasionally):

this problem like #14792, but not the same, he solved his problem by updating the docker version, however, my docker version is up to date. Beside, i can succeed finish the above procedure when i use ubuntu-14.04.img, does anybody know how to fix this problem, thanks.

@thaJeztah, @arthurlogilab

@vklonghml vklonghml changed the title [question]build image faild:Untar re-exec error: exit status 1: output: operation not supported [BUG]build image faild:Untar re-exec error: exit status 1: output: operation not supported Apr 21, 2016
@vklonghml
Copy link
Author

i found a solution for the above problem, when i mount the ubuntu15.04 qcow2 image file on a directory, if i directly build with the above Dockerfile under the mounted directory, it failed with the above error, if i remove the bin directory, it will succeed.

@vklonghml
Copy link
Author

i don't know if it is a bug or something, does anybody knows that?

@thaJeztah
Copy link
Member

Is there a specific reason you're trying to build for own Ubuntu image, instead of using the official ubuntu:15.04 image? Note that you probably have to do more than just adding that image, to get a functional image. See this repository, which is used to create the official images; https://github.com/tianon/docker-brew-ubuntu-core/blob/master/update.sh

@vklonghml
Copy link
Author

@thaJeztah yes, i just want to keep the docker image directories as the same as the ubuntu image. I will check the procedures of creating a official image, thank you.

@thaJeztah
Copy link
Member

@vklonghml I really recommend using the official images instead of trying to build your own Ubuntu base image. The official images are always kept up to date, so you don't have to maintain them yourself (but be aware that Ubuntu 15.04 is EOL, and will not get any updates from Ubuntu). So simply

FROM ubuntu:15.04
....

Also note that if you use a .dockerignore file, you don't have to remove the Dockerfile inside your image (if you add it to the ignore-list).

If you're looking for a simple example to build an SSH image, have a look here; https://docs.docker.com/engine/examples/running_ssh_service/

@vklonghml
Copy link
Author

@thaJeztah ok, thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants