I have a stack that looks like this:
primary: labels: io.rancher.container.pull_image: always io.rancher.sidekicks: sidekick tty: true image: nginx stdin_open: true volumes_from: - sidekick sidekick: labels: io.rancher.container.pull_image: always tty: true image: my/image stdin_open: true volumes: - "/usr/share/nginx/html"
When I use
rancher-compose up -d on this stack, everything works as expected. The sidekick container executes a command on startup which populates
/usr/share/nginx/html, which is then shared to the primary container. The sidekick container’s content is served by the primary container when I start the stack.
My intended workflow for this stack is to modify the sidekick’s content, rebuild the image, push it to the hub, and then tell Rancher to pull a new copy of the sidekick’s image from the hub and restart the sidekick container. When I run
rancher-compose up -p -d -u -c sidekick, I see the following output:
INFO [0/2] [sidekick]: Creating INFO [0/2] [sidekick]: Created INFO [0/2] [sidekick]: Starting INFO [1/2] [sidekick]: Started
When I check the container from the UI, there is no change: the sidekick container is still from the old image, which I verified by looking in the container from the shell. The same happens when I run
rancher-compose up -p -d -u -c without specifying a service. Lots of creating and starting, no actual pulling.
Is this a bug, or is this intentional behavior? Should I use different commands for my workflow?