Duplicate a running container with installed packages

Hello there :wink:

first i have to say that i’am a beginner with docker. :slight_smile:

What i have done with docker yet:

  • installed docker on ubuntu
  • installed yacht and portainer
  • deployed a ubuntu container, expose ports

Now Iam facing following problem:
I have running an ubuntu:latest container, installed some software packages and libs with apt, which are required for my app. everything is ok and my app is listening on port 8081 - yeah… :smiley:

Next step was to use the duplicate function from portainer to “copy/duplicate” my running container (Because i want to multiply my App). After few seconds the new container was accessible but my installed packages and my app are not in this container.

Did I misunderstand the function od duplicate containers?

Best regards,

I don’t know what “duplicate containers” mean in Portainer but I suppose you installed packages directly in the running container and not created an image containing all the dependencies. If Portainer just runs a new container based on the same image, then your dependencies will not be in the new container. Never install packages in a container shell unless you want to test before creating an image.