Upload files into container

I’m currently playing around with rancher and rancher-compose.

my problem is that i’m not able/ or not sure how to upload files into the container.

e.g.
build a node application with external jenkins -> use official node image -> How to upload my Files to my remote rancher via api? Or even better to my convoy stack

Generally you would build your own image starting from the official one that includes everything you need and upload that to a registry, then just run that image: https://docs.docker.com/engine/reference/builder/

If you’re just copying files into containers you don’t have a repeatable build and can’t e.g. scale up the service because the definition of the container doesn’t include any of the stuff you copied in after the fact.

If you have small bits of secret data like password or keys, those can be passed as environment variables or bind-mounted volumes so that they are not part of the image (especially if you make the image public).

I already created my own image for me the process is not so clear.
What i wish is the following:

  1. Build node application using jenkins and store on shared convoy-stack
  2. Publish the binaries into a container which image’s stored on hub
  3. LB

Maybe this will help: https://nodejs.org/en/docs/guides/nodejs-docker-webapp/

You want an image that when run will already have your app all setup, and you can get that all working just on your local computer. Once you have that then you can publish that image to a registry (public or private, out on the internet or locally): https://docs.docker.com/engine/userguide/dockerrepos/.

…and then run that image as a Rancher service, and put a balancer in front of it.