Git Product home page Git Product logo

Comments (9)

jlesage avatar jlesage commented on July 18, 2024

What are you trying to achieve exactly? You want to create multiple instances of the container to access them separately?

from docker-baseimage-gui.

Shinoby1992 avatar Shinoby1992 commented on July 18, 2024

I running multiple instances of my containers and i want that each of them to be visible via vnc
instance 1 = http://vmhost:5800
instance 2 = http://vmhost:5801
Instance 3 = http://vmhost:5802

when i create multiple instances they are all
instance 1 = http://vmhost:5800
instance 2 = http://vmhost:5800
instance 3 = http://vmhost:5800
if i connect via vnc, i have access to instance 3 but 2 and 1 are not reachable...

oh and btw i can't install chrome browser to your ubuntu base image...because seems like you have the base image in 32bit version, how can i change it and use the 64bit ubuntu image

from docker-baseimage-gui.

jlesage avatar jlesage commented on July 18, 2024

I'm not an expert with the swarm mode, but I think that the goal of swarm is to have multiple containers exposing all the same service to increase availability or for load balancing. So what you are describing is what I would expect.

It seems that what you want is something different. Maybe you could achieve it by using a docker compose file, where you define multiple services (on different ports).

from docker-baseimage-gui.

jlesage avatar jlesage commented on July 18, 2024

As for the ubuntu baseimage, you are right: It is not expected to be 32-bit. It should be 64-bit. I will fix this.

from docker-baseimage-gui.

Shinoby1992 avatar Shinoby1992 commented on July 18, 2024

thank you i have to look into it, and another bug or maybe a way to handle it would be nice
im running multiple containers and some of them get after a while
s6-supervise app: warning: finish script lifetime reached maximum value - sending it a SIGKILL
some of them not, don't know why, and then the container stays healthy but the script is not running anymore, i can handle it now because i can change my python script in rerunning after crash.
but is this possible through the container?
i mean settings like:
-> when scripts finish container finishes (then docker could restart the service automatically)
or
-> in the image as -e something like, run script forever if it crash the script restarts (im doin this right now via my python script to restart itself if its crash only problem is, that i will only see whats happening reading its log file, the docker container always looks healthy from outside while it could crash always inside i would not see it till i watch log files

better way for me would be that when scripts finished the whole container goes down. and of course some way to customize s6-supervise app the "script"lifteime because i need my script runned 24/7

from docker-baseimage-gui.

jlesage avatar jlesage commented on July 18, 2024

What you are describing is the actual behavior of the image: When the app service terminates, the container shuts down. To have the app service automatically restarted, you can pass the KEEP_APP_RUNNING=1 environment variable.

When are you getting the "lifetime reached maximum value" error? When app terminates or when you shutdown the container? What do you have in startapp.sh?

from docker-baseimage-gui.

Shinoby1992 avatar Shinoby1992 commented on July 18, 2024

a python script is running thats the only thing written in the startapp.sh
my script does handle exceptions and print them but i cannot see any exception in the log, maybe there is a exception or some other error that accours after random time, does this KEEP_APP_RUNNING=1 restarts/rerun the startapp.sh if its finished (careless if its finished due to exception of the script ) ? or what ecsactly does it do

for info if anyone else want to have multiple containers running with accessibility to all of them
seems like using a docker compose with port ranging does ONLY work on a NOT Swarm mode Docker server

version: '3'
services:
 worker:
  stdin_open: true
  tty: true
  restart: always
  image: mycustomimage:1.0
  shm_size: 2g
  privileged: true
  volumes:
   - ~/Desktop/docker/appdata/firefox:/config:rw
  ports:
   - '5800-5900:5800

this does create automatically each one with a different port vor vnc in range 5801-5900 if using with
docker-compose up --scale worker=5

from docker-baseimage-gui.

jlesage avatar jlesage commented on July 18, 2024

When KEEP_APP_RUNNING=1 , startapp.sh is re-executed when it terminates.

The way your script is invoked in startapp.sh can make a difference. Make sure you invoke with with exec.

from docker-baseimage-gui.

jlesage avatar jlesage commented on July 18, 2024

Closing this issue, please re-open if needed.

from docker-baseimage-gui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.