Re-create image to update container

Hi together,

I struggling a little with the update of a nextcloud container and therefore with the update of an image.

I builded my own image with the following command:

FROM nextcloud:fpm

RUN set -ex; \
    \
    apt-get update; \
    apt-get install -y --no-install-recommends \
        ffmpeg \
    ; \
    rm -rf /var/lib/apt/lists/*
    
ENV NEXTCLOUD_UPDATE=1

But now there is a new nextcloud:fpm image available. How can I force portainer to pull the new version?

What I’ve done (but this is just a bad workaround):

  1. Changed the container to directly use nextcloud:fpm via duplicate/edit button.

  2. Delete my own image (which was created with the statements above) and created it again.

  3. Change the container again via duplicate/edit

DONE

What’s the correct way to handle this?

Thank you for your help.

Hi @TorstenH,

You must pull the latest image manually and rebuild your own image :slightly_smiling_face: .

That means I have to use the workaround or how can I pull the latest image? Which buttons I have to click?

First you can pull the image on Images menu

Then build your image on Images > Build a new Image , paste your docker file there and click Build the Image at the bottom.

Now your custom image already created with new nextcloud:fpm

and I suggest you using Stack, cause you can update the stacks without edit/duplicate running container

First step seems not to be required because the image gets pulled automatically.

But now there is no button to re-create the mynextcloud:fpm image. I’m not familiar with stacks but I think that would just use the image and doesn’t re-create it to get the latest version from the base image.