Trying to create a portable terminal environment with docker+clear linux. I have the following docker file.
FROM clearlinux:latest
RUN swupd update
RUN swupd bundle-add tmux
RUN swupd bundle-add git
RUN swupd bundle-add zsh
RUN swupd bundle-add sysadmin-basic
RUN swupd bundle-add sudo
I get this error on the second swupd call.
The command '/bin/sh -c swupd bundle-add git' returned a non-zero code: 6
It doesn’t matter what order i run the commands it seems to always be the second command. What am I doing wrong here?
I actually want to put them on separate lines so I can take advantage of caching when adding packages in the future. otherwise I have to rebuild the whole thing every time I add a package. Although I guess I could just collapse them every once in a while.
I thought this might be something wrong with my setup but I tried a similar setup with ubuntu and it didn’t have any issues, I also tried just running docker run -ti clearlinux:latest bash and running these commands manually and everything worked fine. It’s only when I run it in a Dockerfile
I wouldn’t think so but I don’t have an Ubuntu box handy to test.
Are you running the build with --no-cache or deleting the previously build docker images? Sometimes those previous builds can cause weird issues for me.
This looks like a bug that we are still investigating that are affecting some specific versions of docker on Ubuntu. I couldn’t reproduce that on Clear systems yet.
A work around for the problem is to clean swupd cache before running a bundle-add. Can you try to add this line before the first bundle-add command for a while: