OpenMediaVault-Plugin-Developers / openmediavault-compose

openmediavault plugin for docker-compose
14 stars 5 forks source link

Possibility to update image of Dockerfile #6

Closed rabesocke closed 1 year ago

rabesocke commented 1 year ago

There seems to be no possibility to update an image, that is used in a Dockerfile.

For example: I have a Dockerfile for Nextcloud (as described in the Nextcloud repo) to use cron, imagick etc. In Portainer, I went to the image overview and pulled this image in a new version. After that I created a new image with the Dockerfile.

ryecoaaron commented 1 year ago

The Dockerfile tab should be used to build images. If you are using an inage that already exists, you should be using it in the Files tab. Once you do this, you will just need to click Pull to pull the new image.

rabesocke commented 1 year ago

That's what I'm doing. Nextcloud suggest to build an own image if you need special extensions like Samba, Imagick, etc. https://github.com/docker-library/docs/blob/master/nextcloud/README.md#adding-features https://github.com/nextcloud/docker/tree/master/.examples/dockerfiles/full/apache

This is the beginning of the Dockerfile. With that, I create an own image based on the existing Nextcloud image. The Nextcloud image is updated and I want to update my custom image. But it seems, that the Build button doesn't update the Nextcloud image.

FROM nextcloud:26

RUN set -ex; \
    \
    apt-get update; \
    apt-get install -y --no-install-recommends \
#        ffmpeg \
        ghostscript \
        libmagickcore-6.q16-6-extra \
        procps \
        smbclient \
        supervisor \
#       libreoffice \
    ; \

(...) 
ryecoaaron commented 1 year ago

The plugin is just running docker build. Normally you would do a docker pull nextcloud:26 before the build. You could create a very simple nextcloud:26 docker-compose on the Files tab and click Pull there when you needed an updated image or I guess I could add a button that would pull the image in the Dockerfile.

rabesocke commented 1 year ago

👍 for a pull button at Dockerfile

I think, this would me the most straight forward way instead of adding an useless compose file only to pull newer images.

ryecoaaron commented 1 year ago

6.7.17 in the repo. It adds a button to pull and build the dockerfile by adding the --pull flag to the docker build command