steamos-container-creator
steamos-container-creator copied to clipboard
stat /bin/sh: no such file or directory
After running the script I get this error:
OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "/bin/sh": stat /bin/sh: no such file or directory": unknown
I think the issue is on the host OS I am using. I am using Ubuntu 16, but I see brewmaster only has Jessie and Understanding that it creates the new docker image from the host it is not compatible. Am I correct?
So I am assuming this just Runs in either a Debian9 or Ubuntu 14?
I have only tested it on Debian 9, I'm afraid. The script which debootstrap uses is a copy of /usr/share/debootstrap/scripts/jessie file installed by debootstrap in Debian 9. If you are running a newer Ubuntu version, you may be able to use the newer version instead.
Another option would be to use the sharkwouter/steamos container found on the Dockerhub or using a VM with Debian on it. I want to make this system better in the future, but I don't have time for it right now.
That is a strange looking error, though. Which steps do you take to trigger it?
I tried with Ubutnu14 and I get the same error, so I guess the code only works with Debian9. I will take a look into it and try to make it work, but this is what I do:
- Install Docker
- Install realpath and debootstrap
- Clone your repo
- Docker pull the image (sharkwouter/steamos)
- Run the script (sudo ./setup-chroot.sh)
In the debootstrap.log I find the following:
/usr/sbin/debootstrap: 48: /usr/sbin/debootstrap: setup_merged_usr: not found
And the when the Dockerfile is run it shows the following error:
Sending build context to Docker daemon 65.77MB Step 1/4 : FROM brewmaster-base ---> 9af4d4f9e3f1 Step 2/4 : MAINTAINER Wouter Wijsman ---> Running in 68f5f0f34129 Removing intermediate container 68f5f0f34129 ---> 91994daba327 Step 3/4 : RUN ./postinstall.sh ---> Running in 0ffab86ad91b OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "/bin/sh": stat /bin/sh: no such file or directory": unknown
apparently setup_merged_usr doesn't exist fior Ubuntu (not sure about this). This is called from brewmaster script in the first_stage_install () method
So I will try with Debian and it should work just fine, but It is good to know the differences. I don't know much about debootstrap, so I don't know really what is being done in the different stages.
I tested this on Ubuntu 18.10 yesterday to see if I can reproduce this, but I did not get this error :/
Could you tell me what you are trying to use this project for? Then maybe I can help you out in another way.
Hi,
Sorry for the late repsonse as I stop trying for a while. I tried it in a Debian9 VM and it worked just fine, but I tried again with an Ubuntu server (another one) and I see the same issue:
gpgv: Signature made Thu Aug 2 01:54:22 2018 UTC using RSA key ID 8ABDDD96 gpgv: Good signature from "Valve SteamOS Release Key [email protected]" /usr/sbin/debootstrap: 48: /usr/sbin/debootstrap: setup_merged_usr: not found
What I am trying to do is to run a SteamOS container in a remote server (which is an Ubuntu 16.04 server), and try to tie up with the GPU the server has. This is a Bare metal server (non virtual) that has docker installed directly. I am not sure if I am missing something, or if you have an updated version of the scripts that works with Ubuntu as well.
I will much appreciate if you could put the steps you followed to run it in your Ubuntu machine.
No problem. On Ubuntu I installed the docker.io and the debootstrap packages with:
sudo apt-get install docker.io debootstrap
Cloned the repo ofc:
git clone https://github.com/sharkwouter/steamos-container-creator.git
cd steamos-container-creator
Then I ran the script:
./setup-chroot
That creates the brewmaster container. Which you can start with the other script:
./start-container.sh
You can also get pretty much the same result by using the container from the dockerhub. For this you also need to install the docker.io package, then you can just run:
docker run -ti sharkwouter/steamos /bin/bash
You may want to update the packages in the container with apt-get update && apt-get upgrade, though, since it is getting a bit old.