dockercontainer

23 views
Skip to first unread message

Atul Sharma

unread,
Jun 19, 2019, 7:23:34 PM6/19/19
to devops-toolchain
I want to run the docker container in background permanently, But after running the following command it is immediate exited.  Please help to fix this,


[root@localhost container]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ssh                 cont                35970fc28811        About an hour ago   536 MB
docker.io/centos    7                   9f38484d220f        3 months ago        202 MB
[root@localhost container]#
[root@localhost container]#
[root@localhost container]#
[root@localhost container]# docker run -it -d --privileged -p 2222:22 --name con1 --hostname 'ssh1' 35970fc28811
5916fb131e6bc37712c0d1e6f86b503b72a98383c73ea80347a71b604d2a2112
[root@localhost container]#
[root@localhost container]#
[root@localhost container]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@localhost container]#
[root@localhost container]#
[root@localhost container]#
[root@localhost container]# docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                     PORTS               NAMES
5916fb131e6b        35970fc28811        "/usr/sbin/sshd -D..."   10 seconds ago      Exited (1) 9 seconds ago                       con1
[root@localhost container]#   
[root@localhost container]#
[root@localhost container]#
[root@localhost container]#
[root@localhost container]#

Sebastian Otaegui

unread,
Jun 20, 2019, 7:33:32 AM6/20/19
to devops-t...@googlegroups.com
I recommend you follow this guide, learning the fundamentals will go a long way 

Best regards 

--
You received this message because you are subscribed to the Google Groups "devops-toolchain" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devops-toolcha...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/devops-toolchain/6a276ff3-0caf-4ac4-8f2b-9bba5a8b8136%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jguice

unread,
Jun 20, 2019, 8:53:54 AM6/20/19
to devops-toolchain

Atul Sharma

unread,
Jun 22, 2019, 4:48:50 AM6/22/19
to devops-t...@googlegroups.com
@All: Thanks
Best,

Atul


--
You received this message because you are subscribed to a topic in the Google Groups "devops-toolchain" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/devops-toolchain/aFEoHWV_vS8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to devops-toolcha...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/devops-toolchain/8f801a56-bfcf-43cc-99aa-0c5ba91928be%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages