Ubuntu container on Mac Osx Sierra

Hi,

I have tried to start a Ubuntu 16 LTS server container on my Mac OsX: it was downloaded, but won’t start.

docker run hello-world works, so, i cannot understand why it is not running (and the same on Windows 10)

Any Help appreciated.

Dr. Ing. Giovanni Tomassini
Digital Manager

I see the same thing on my linux box

the ubuntu image has cmd=bash in its dockerfile… so it starts, nothing to do, and ends.

it is intended to run ONE command

you can see this with docker inspect ubuntu

"Config": {
            "Hostname": "706cb4504c90",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": null,
            "Cmd": [
                "/bin/bash"
            ],

the docker container design is there is ONE ‘application’ running… and it is in the foreground. if it ends, then the container shuts down

You can make the Ubuntu container stay open with

Docker run -it Ubuntu

Interactive mode

Hi sdetwell,

Tx for your reply, and if i want to make the ubuntu be a demon, with restart=always?

Run with -d, it does not work.

I see a lot of projects LAMP, but based on Ubuntu 14, andi want latest.

Regards,
g10t0m

docker design is a single command that never returns…

the ubuntu image uses /bin/bash,
but if it doesn’t have a command, it just returns… and then the container terminates

so, try this… just for example

Docker run -d Ubuntu sleep 1000000

that will have the one app (bin/bash) execute the sleep command for 1 million seconds