based on Moving docker-compose containersets
I have loaded the images :
$ docker images -a
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
br/irc              latest              3203cf074c6b        23 hours ago        377MB
openjdk             8u131-jdk-alpine    a2a00e606b82        5 days ago          101MB
nginx               1.13.3-alpine       ba60b24dbad5        4 months ago        15.5MB
but now i want to run them, as they would run with docker-compose, but i cannot find any example.
here is the docker-compose.yml
version: '3'
services:
  irc:
    build: irc
    hostname: irc
    image: br/irc:latest
    command: |
      -Djava.net.preferIPv4Stack=true
      -Djava.net.preferIPv4Addresses
      run-app
    volumes:
      - ./br/assets/br.properties:/opt/br/src/java/br.properties
  nginx:
    hostname: nginx
    image: nginx:1.13.3-alpine
    ports:
      - "80:80"
    links:
      - irc:irc
    volumes:
      - ./nginx/assets/default.conf:/etc/nginx/conf.d/default.conf
so how can i run the container, and attach to it, to see if its running, and in what order do i run these three images. Just started with docker, so not sure of the typical workflow ( build, run, attach etc )
so even though i do have docker-compose yml file, but since i have the build images from another host, can i possibly run docker commands to run and execute the images ? making sure that the local images are being referenced, and not the ones from docker registry.
Thanks @tgogos, this does give me a general overview, but specifically i was looking for:
$ docker run -dit openjdk:8u131-jdk-alpine
then:
$ docker ps -a
CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS                      PORTS               NAMES
cc6ceb8a82f8        openjdk:8u131-jdk-alpine   "/bin/sh"                52 seconds ago      Up 51 seconds                                   vibrant_hodgkin
shows its running
2nd:
$ docker run -dit nginx:1.13.3-alpine
3437cf295f1c7f1c27bc27e46fd46f5649eda460fc839d2d6a2a1367f190cedc
$ docker ps -a
CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS                      PORTS               NAMES
3437cf295f1c        nginx:1.13.3-alpine        "nginx -g 'daemon ..."   20 seconds ago      Up 19 seconds               80/tcp              vigilant_kare
cc6ceb8a82f8        openjdk:8u131-jdk-alpine   "/bin/sh"                2 minutes ago       Up 2 minutes                                    vibrant_hodgkin
then: finally:
[ec2-user@ip-10-193-206-13 DOCKERLOCAL]$ docker run -dit br/irc
9f72d331beb8dc8ccccee3ff56156202eb548d0fb70c5b5b28629ccee6332bb0
$ docker ps -a
CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS                      PORTS               NAMES
9f72d331beb8        br/irc              "/opt/irc/grailsw"       8 seconds ago       Up 7 seconds                8080/tcp            cocky_fermi
3437cf295f1c        nginx:1.13.3-alpine        "nginx -g 'daemon ..."   56 seconds ago      Up 55 seconds               80/tcp              vigilant_kare
cc6ceb8a82f8        openjdk:8u131-jdk-alpine   "/bin/sh"                2 minutes ago       Up 2 minutes                                    vibrant_hodgkin
All three UP !!!!
 
     
    