Docker Community Forums

Share and learn in the Docker community.

Container keep restarting


(Kamiz) #1

Hi,
I’m a beginner, and my goal is to create a container and be able to log in directly to execute commands. However, I have a problem. I create my image, I created a container from it. Once I try to connect, the container restarts in a loop.

Here is my Dockerfile :

FROM debian
MAINTAINER Kamiz

RUN apt-get -y update
CMD /bin/bash

On Portainer, I try to open a session :

Capture

Then, i have this message on Portainer :

{"message":"Container d681deecb37a5b04e1b61c869c98873afdf99e62b6374238480203bdbeaab123 is restarting, wait until the container is running"}

if I do not try to start a session, the container does not crash.
What is wrong ?


(Kamiz) #2

Solved by launching the container with -i -t arguments :smiley: