Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.

SOLVED How to add files into /app/data?

  • How do you add files into /app/data from inside a docker container?

    Please point me to a sample repo if it exists on Couldnt find one myself.

  • Staff

    When an app is installed, /app/data is mounted as a volume into the container, so things have to be added during runtime there. For packaging related data or initial config file templates, this usually is done in the apps entry point script (mostly called

    For example surfer needs a public folder in /app/data so this happens at

  • @nebulon Thanks!

    For anyone else, this is how I did it.

    In 'Dockerfile', I added the files into the /app/code directory using:

    COPY public /app/code/temp-public

    Then, in '' I added the following to ensure it only copies files over on first run:

    if [[ -z "$(ls -A /app/data/public)" ]]; then
        echo "==> Add public files on first run"
        cp -r /app/code/temp-public/* /app/data/public/
        echo "==> Do not override existing public folder"