#177 Disable interactive "cp" in fedora base image
Opened 7 years ago by jberkus. Modified 6 years ago

Currently, the "cp" command in fedora base image is "cp -i" interactive, as is it with Fedora Workstation. This can cause "cp" commands in dockerfile scripts to fail, because of the interactive prompt, causing a lot of debugging frustration.

We should switch to standard "cp" in the base image.


@jberkus - can you explain what situation you were in when you hit this problem? I'm not seeing it:

$ sudo docker run -it --rm fedora-docker-base-25-1.2.x86_64  bash
[root@0dcea1cb767e /]# 
[root@0dcea1cb767e /]# cp /etc/resolv.conf /tmp/
[root@0dcea1cb767e /]#

Try to copy over a file.

It looks like you can ignote the alias w/ \cp.

Yes, there's a workaround. However, imagine that you're a developer porting your Dockerfiles from Ubuntu. You run into bizarre errors with cp, or hangs during the build. Do troubleshoot them, or give up and go back to Ubuntu?

Right, I wonder if we can/should toss in some unalias commands into: https://pagure.io/fedora-kickstarts/blob/f25/f/fedora-docker-base.ks. rm and mv are also aliased to be interactive. CentOS has the same aliases.

so this is the same behavior as the F24 docker base image so I vote that we don't make this change until after F25 release. - Also someone needs to step up and "own" the issue and be responsible for making the change.

Isn't it rather something to be fix in the alias definition, ie, add the alias only when there is a tty ? Cause the issue is for more than docker, as I assume cronjob would also fail for that, etc.

Metadata Update from @dustymabe:
- Issue tagged with: containers

6 years ago

Login to comment on this ticket.

Metadata