Helioviewer-Project/helioviewer.org-docker

Container failing to access files - Permission denied

anthfuller opened this issue · 13 comments

Looks like there are locks on the API & Helioviewer.org files and there was one on the Sampe-data folder as well. I've deleted the files and started over, and the API & helioviewer.org files have locks.

Did you start the container with the -v options to mount the api & helioviewer.org folders in the container?

There shouldn't be any permission issues as long as they're mounted.

Yes, getting errors that the folders don't exist. I've started over and going through the proceedures now.

Are these the exact commands to run?
docker run
-p 127.0.0.1:8080:80
-p 127.0.0.1:8081:81
-v "$PWD/api:/var/www/api.helioviewer.org"
-v "$PWD/helioviewer.org:/var/www/docroot"
-v "$PWD/sample-data:/var/www/jp2"
-d
-t dgarciabriseno/helioviewer.org-docker:v1.3_setup_done

Logs I'm seeing from the container:
2023-07-06 17:10:41 cp: cannot create regular file '/var/www/helioviewer.org/resources/js/Utility/Config.js': No such file or directory
2023-07-06 17:10:41 mkdir: cannot create directory '/var/www/helioviewer.org/log': Permission denied
2023-07-06 17:10:41 mkdir: cannot create directory '/var/www/helioviewer.org/cache': Permission denied
2023-07-06 17:10:41 first_time_run.sh: line 37: cd: /var/www/helioviewer.org/resources/build: No such file or directory
2023-07-06 17:10:41 chmod: cannot access 'jsmin/jsmin.py': No such file or directory
2023-07-06 17:10:41 Buildfile: build.xml does not exist!
2023-07-06 17:10:41 Build failed
2023-07-06 17:10:42 * Starting Apache httpd web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
2023-07-06 17:10:43 *
2023-07-06 17:10:43 * Starting MySQL database server mysqld su: warning: cannot change directory to /nonexistent: No such file or directory
2023-07-06 17:10:48 [ OK ]
2023-07-06 17:10:48 375:C 06 Jul 2023 17:10:48.957 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
2023-07-06 17:10:48 375:C 06 Jul 2023 17:10:48.957 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=375, just started
2023-07-06 17:10:48 375:C 06 Jul 2023 17:10:48.957 # Configuration loaded
2023-07-06 17:10:48 nohup: ignoring input and redirecting stderr to stdout
2023-07-06 17:10:50 [hit enter key to exit] or run 'docker stop '

Also when trying to setup local to your own machine, on Ubuntu 22.04, these packages don't exist
E: Unable to locate package php7.4
E: Couldn't find any package by glob 'php7.4'
E: Unable to locate package php7.4-mysql
E: Couldn't find any package by glob 'php7.4-mysql'
E: Unable to locate package php7.4-curl
E: Couldn't find any package by glob 'php7.4-curl'

I know the instructions say Ubuntu 20.04, just an FYI
https://helioviewer-project.github.io/install/

Sorry for taking so long to get back to you.

Copy/Paste this into a linux terminal:

mkdir helioviewer-docker
cd helioviewer-docker
git clone https://github.com/helioviewer-Project/api
git clone https://github.com/helioviewer-Project/helioviewer.org
cd helioviewer.org
git submodule update --init --recursive
cd ..
docker run -p 127.0.0.1:8080:80 -p 127.0.0.1:8081:81 -v "$PWD/api:/home/helioviewer/api.helioviewer.org" -v "$PWD/helioviewer.org:/home/helioviewer/helioviewer.org" -d -t dgarciabriseno/helioviewer.org

That v1.3_setup_done tag is old. Also those install instructions on our blog page are old... The container is the way to go for a development setup.

From your logs it looks like the api/helioviewer.org folders that were mounted are missing the source files. Most likely the folder that was mounted wasn't the right folder.

@anthfuller Have you tried this?

No, haven't had the time, been very busy. I'll try it later towards the weekend.

Thanks

I'll definitely let you know if it works...

Thanks, I really appreciate it.
I've been using this myself and I do want it to be easily usable.

If you're still interested in this, I've updated everything to use docker compose. It's much simpler to run now, and won't have any of the previously reported errors, those scripts are gone.

Check the latest info in the readme

Closing since there's no new updates on this. And the old docker run startup is gone.