Hi,
I\m pretty sure I had this working in the past but it was a long time ago so I’m back to building bloks on rancher again… anyways, I’m trying to use a cattle environment and running into some issues.
I have a nginx container and a “data” container containing the static files to be served. Thinking is I can upgrade the data container when needed without needing to rebuild the entire server image. (I took this to barebones, but its a series of app servers with long build times, etc)…
Anyways, I have this docker-compose file, which runs fine on docker-compose.
version: '2' services: nginx: build: context: nginx labels: io.rancher.sidekicks: nginx-files volumes_from: - nginx-files restart: always ports: - 888:80 nginx-files: build: context: nginx-files volumes: - /var/www
So on docker-compose this works perfectly… and I can access the docker host on port 888 and access the files in the files container. When trying to run this on rancher, however, the stack seems to be “built” properly, however when I try to start it it never detects the stack as started as the sidekick container (files container) runs then stops…
Nonetheless, if I access the rancher host where the container is running it still works despite the “wonky” status and restar cycle on the cotnainer… so in effect it is running and reading the files from the sidekick
Thanks for all help!!
Files dockerfile for reference:
FROM debian:jessie VOLUME /var/www WORKDIR /var/www COPY files/ /var/www/ #CMD ["echo", "STATIC FILES CONTAINER"] CMD "/bin/true" # TRIED WITH AN ECHO, AND ALSO WITH /bin/true with same result
And screenshots: