blend-os / blendOS

A seamless blend of all Linux distributions.
GNU General Public License v3.0
778 stars 22 forks source link

How to run my custom docker container inside BlendOS Ubuntu container #96

Open croosn opened 1 year ago

croosn commented 1 year ago

Steps to reproduce:

  1. Create Ubuntu container
  2. Install Docker engine in it https://docs.docker.com/engine/install/ubuntu/
  3. Run commands from Ubuntu container
    
    [croosn@ubuntu ~]$ docker run hello-world
    docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create": dial unix /var/run/docker.sock: connect: permission denied.
    See 'docker run --help'.

[croosn@ubuntu ~]$ sudo docker run hello-world docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. See 'docker run --help'.

[croosn@ubuntu ~]$ systemctl status docker System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

[croosn@ubuntu ~]$ service docker status Docker is not running

[croosn@ubuntu ~]$ service docker start Docker must be run as root

[croosn@ubuntu ~]$ sudo service docker start /etc/init.d/docker: 61: ulimit: error setting limit (Operation not permitted)

chadly commented 1 year ago

I know it uses ~docker~ podman under the hood for each "system container" and the base system is Arch.

So you'd effectively be trying to run a docker container inside of a docker container by running docker within ubuntu - which I think is possible...

Although, I'm also curious what the recommended strategy is for doing this. I develop software and make heavy use of docker.

I'm hoping blendOS has some kind of streamlined workflow for this.

croosn commented 1 year ago

I develop software and make heavy use of docker.

That's exactly why I need it as well. I might need different versions of docker and docker compose, so this was the perfect opportunity to run independent versions on multiple distros.

Ast3risk-ops commented 1 year ago

I know it uses ~docker~ podman under the hood for each "system container" and the base system is Arch.

So you'd effectively be trying to run a docker container inside of a docker container by running docker within ubuntu - which I think is possible...

Although, I'm also curious what the recommended strategy is for doing this. I develop software and make heavy use of docker.

I'm hoping blendOS has some kind of streamlined workflow for this.

Don't run a container in a container, use the podman on the host.

Ast3risk-ops commented 1 year ago

Podman is fully compatible with the docker API, dockerfiles, docker-compose and Docker Hub