Create docker image with apps

Hello, I’m looking to create a docker image containing the news app from the nextcloud 21 image.
I’ve downloaded the code for the news app and I’ve added a dockerfile in it. This is what it contains:

FROM nextcloud:21.0.1-apache

RUN apt-get update; \
    apt-get install -y --no-install-recommends \
        make curl nodejs npm \
    ;

RUN npm i npm@latest -g;

RUN mkdir -p /var/www/html/apps/news;

COPY . /var/www/html/apps/news/

RUN cd /var/www/html/apps/news; make;

The docker build command succeeds, and it runs. When I open the interactive terminal and ls /var/www/html/apps, the news folder doesn’t exist. Is this normal? Or am I missing something? Any help is appreciated.

Thanks!

perhaps you have to use custom_apps: docker/Dockerfile-alpine.template at master · nextcloud/docker · GitHub

1 Like

Thanks for the tip! It works. Here’s my dockerfile if anyone is wondering how I did it (I don’t know if this is the best way to do it, I’m new to docker) :

FROM nextcloud:21.0.1-apache

RUN apt-get update; \
    apt-get install -y --no-install-recommends \
        make curl nodejs npm \
    ;

# Install latest version of npm to avoid warnings
RUN set -ex; npm i npm@latest -g;

COPY . /usr/src/nextcloud/custom_apps/news/

# Install news app
RUN set -ex; cd /usr/src/nextcloud/custom_apps/news/; make;