LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 10-05-2020, 04:42 AM   #16
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002

Quote:
Originally Posted by banderas20 View Post
However, If I issue the following command to run the image:

Code:
docker run -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro centos7-systemd
It crashes with this error:

Code:
Failed to mount tmpfs at /run: Operation not permitted
[!!!!!!] Failed to mount API filesystems, freezing.
Exactly the same thing happened to me. No idea why, but the Stackoverflow thread saved me.
 
Old 10-05-2020, 04:46 AM   #17
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
In short: First start the default process in the container, which is /sbin/init (see the Dockerfile). This runs systemd. Then run a shell inside the container, install sshd and start it with systemctl.
Quote:
Originally Posted by banderas20 View Post
This last part I didn't understand. Anyway, I finally managed to get it up and running.
I mean that the first command is docker run. It launches the process defined by CMD ["/usr/sbin/init"] in the Dockerfile. This also launches systemd.
Second step: Run a shell in this container with docker exec. From this shell, you can install sshd and start it.
 
Old 10-06-2020, 03:33 AM   #18
banderas20
Member
 
Registered: Aug 2018
Posts: 136

Original Poster
Rep: Reputation: Disabled
@berndbausch,

thanks a million, mate!
 
  


Reply

Tags
docker, ssh



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Meet Super Container OS, a Debian-Based Live Distro with a Built-In Container Engine LXer Syndicated Linux News 0 08-04-2020 11:24 AM
linux container host os and container os question jzoudavy Linux - Newbie 1 09-01-2015 05:21 AM
LXer: Inside the Open Container Project: How Docker plans to unite the container market LXer Syndicated Linux News 0 06-23-2015 04:30 AM
[SOLVED] can't ssh into docker container skinney Linux - Server 1 04-25-2014 07:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 08:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration