Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create Docker image #41

Open
mfzhsn opened this issue Jul 24, 2023 · 2 comments
Open

Unable to create Docker image #41

mfzhsn opened this issue Jul 24, 2023 · 2 comments

Comments

@mfzhsn
Copy link

mfzhsn commented Jul 24, 2023

Hello All,

I am trying to create a new docker image, but I am getting mounting issue while using the provided scripts. Have check the permissions and mounts too.

Any solutions would greatly help.

Logs below

`./local_build.sh

  • docker network create --attachable -d bridge radiusdesk-bridge
    Error response from daemon: network with name radiusdesk-bridge already exists
  • source ./.env
    ++ RADIUSDESK_VOLUME=/mnt/data/radiusdesk
    ++ RADIUSDESK_NETWORK=radiusdesk-bridge
  • echo Radiusdesk 2-docker system builder v1.0
    Radiusdesk 2-docker system builder v1.0
  • echo ---------------------------------------

  • echo

  • echo Special shout out to:
    Special shout out to:

  • echo - Dirk van der Walt for building this brilliant software and helping debug the dockers

  • Dirk van der Walt for building this brilliant software and helping debug the dockers
  • echo - Enock Mbewe for building the first docker version and showing the way with supervisord
  • Enock Mbewe for building the first docker version and showing the way with supervisord
  • echo - Keegan White for all the work on traefik and improving the iNethi architecture
  • Keegan White for all the work on traefik and improving the iNethi architecture
  • echo

  • echo Starting Build ....
    Starting Build ....

  • echo

  • echo Copying database files to volume mounts for MariaDB ...
    Copying database files to volume mounts for MariaDB ...

  • mkdir -p /mnt/data/radiusdesk

  • mkdir -p /mnt/data/radiusdesk/db_startup

  • mkdir -p /mnt/data/radiusdesk/db_conf

  • chmod -R 777 /mnt/data/radiusdesk

  • chmod -R 777 /mnt/data/radiusdesk/db_startup

  • chmod -R 777 /mnt/data/radiusdesk/db_conf

  • '[' -d rdcore ']'

  • echo 'Directory rdcore exists.'
    Directory rdcore exists.

  • cp rdcore/cake4/rd_cake/setup/db/rd.sql /mnt/data/radiusdesk/db_startup

  • cp db_priveleges.sql /mnt/data/radiusdesk/db_startup

  • cp startup.sh /mnt/data/radiusdesk/db_startup

  • cp my_custom.cnf /mnt/data/radiusdesk/db_conf

  • echo

  • echo Building docker database container ...
    Building docker database container ...

  • docker-compose up -d rdmariadb
    /usr/lib/python3/dist-packages/paramiko/transport.py:236: CryptographyDeprecationWarning: Blowfish has been deprecated
    "class": algorithms.Blowfish,
    Starting radiusdesk-mariadb ... error

ERROR: for radiusdesk-mariadb Cannot start service rdmariadb: Mounts denied:
The path /mnt/data/radiusdesk/db_conf/my_custom.cnf is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
See https://docs.docker.com/ for more info.

ERROR: for rdmariadb Cannot start service rdmariadb: Mounts denied:
The path /mnt/data/radiusdesk/db_conf/my_custom.cnf is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
See https://docs.docker.com/ for more info.
ERROR: Encountered errors while bringing up the project.

  • echo

  • echo Waiting for MariaDB to come up ...
    Waiting for MariaDB to come up ...

  • sleep 60

  • echo Creating database for Radiusdesk ...
    Creating database for Radiusdesk ...

  • docker exec -u 0 -it radiusdesk-mariadb /tmp/startup.sh
    Error response from daemon: Container 765a367c96cc638d82490b614e6f1da498271f65b7f56201beae760428477d73 is not running

  • echo

  • echo Building Radiusdesk container with nginx, php-fpm and freeradius ...
    Building Radiusdesk container with nginx, php-fpm and freeradius ...

  • docker-compose build
    /usr/lib/python3/dist-packages/paramiko/transport.py:236: CryptographyDeprecationWarning: Blowfish has been deprecated
    "class": algorithms.Blowfish,
    rdmariadb uses an image, skipping
    Building radiusdesk
    [+] Building 5.7s (59/59) FINISHED
    => [internal] load build definition from Dockerfile-build-radiusdesk 0.0s
    => => transferring dockerfile: 5.44kB 0.0s
    => [internal] load .dockerignore 0.0s
    => => transferring context: 2B 0.0s
    => [internal] load metadata for docker.io/jtreminio/php:8.1 0.4s
    => [internal] load build context 4.1s
    => => transferring context: 427.18MB 4.0s
    => [ 1/54] FROM docker.io/jtreminio/php:8.1@sha256:5d33f361015f910ad3cb270f2b2c574e1a8bf329ff65d7b15 0.0s
    => CACHED [ 2/54] RUN apt-get update 0.0s
    => CACHED [ 3/54] RUN apt-get -y install language-pack-en-base 0.0s
    => CACHED [ 4/54] RUN apt-get -y install nginx 0.0s
    => CACHED [ 5/54] RUN apt-get -y install libdatetime-perl 0.0s
    => CACHED [ 6/54] RUN apt-get -y install freeradius freeradius-mysql 0.0s
    => CACHED [ 7/54] RUN apt-get install -y supervisor 0.0s
    => CACHED [ 8/54] RUN apt-get install -y subversion 0.0s
    => CACHED [ 9/54] COPY ./default /etc/nginx/sites-enabled/ 0.0s
    => CACHED [10/54] COPY ./disable_strict_mode.cnf /etc/mysql/conf.d/ 0.0s
    => CACHED [11/54] COPY ./rdcore /var/www/rdcore 0.0s
    => CACHED [12/54] RUN mkdir -p /var/www/html 0.0s
    => CACHED [13/54] RUN ln -s /var/www/rdcore/rd /var/www/html/rd 0.0s
    => CACHED [14/54] RUN ln -s /var/www/rdcore/cake4 /var/www/html/cake4 0.0s
    => CACHED [15/54] RUN ln -s /var/www/rdcore/cake4 /var/www/html/cake3 0.0s
    => CACHED [16/54] RUN ln -s /var/www/rdcore/login /var/www/html/login 0.0s
    => CACHED [17/54] RUN ln -s /var/www/rdcore/AmpConf/build/production/AmpConf /var/www/html/conf_dev 0.0s
    => CACHED [18/54] RUN ln -s /var/www/rdcore/login/rd_client/build/production/AmpConf /var/www/html/u 0.0s
    => CACHED [19/54] RUN ln -s /var/www/rdcore/cake4/rd_cake/setup/scripts/reporting /var/www/html/repo 0.0s
    => CACHED [20/54] RUN mkdir -p /var/www/html/cake4/rd_cake/logs 0.0s
    => CACHED [21/54] RUN mkdir -p /var/www/html/cake4/rd_cake/webroot/files/imagecache 0.0s
    => CACHED [22/54] RUN mkdir -p /var/www/html/cake4/rd_cake/tmp 0.0s
    => CACHED [23/54] RUN chown -R www-data. /var/www/html/cake4/rd_cake/tmp 0.0s
    => CACHED [24/54] RUN chown -R www-data. /var/www/html/cake4/rd_cake/logs 0.0s
    => CACHED [25/54] RUN chown -R www-data. /var/www/html/cake4/rd_cake/webroot/img/realms 0.0s
    => CACHED [26/54] RUN chown -R www-data. /var/www/html/cake4/rd_cake/webroot/img/dynamic_details 0.0s
    => CACHED [27/54] RUN chown -R www-data. /var/www/html/cake4/rd_cake/webroot/img/dynamic_photos 0.0s
    => CACHED [28/54] RUN chown -R www-data. /var/www/html/cake4/rd_cake/webroot/img/access_providers 0.0s
    => CACHED [29/54] RUN chown -R www-data. /var/www/html/cake4/rd_cake/webroot/img/hardwares 0.0s
    => CACHED [30/54] RUN chown -R www-data. /var/www/html/cake4/rd_cake/webroot/files/imagecache 0.0s
    => CACHED [31/54] RUN cp /var/www/html/cake4/rd_cake/setup/cron/cron4 /etc/cron.d/ 0.0s
    => CACHED [32/54] RUN chmod 0644 /etc/cron.d/cron4 0.0s
    => CACHED [33/54] RUN crontab /etc/cron.d/cron4 0.0s
    => CACHED [34/54] RUN mkdir -p /var/log/php-fpm 0.0s
    => CACHED [35/54] RUN mv /etc/freeradius /etc/freeradius.orig 0.0s
    => CACHED [36/54] RUN mkdir -p /etc/freeradius 0.0s
    => CACHED [37/54] RUN tar xzf /var/www/html/cake4/rd_cake/setup/radius/freeradius-3-radiusdesk.tar.g 0.0s
    => CACHED [38/54] RUN mv /etc/freeradius/freeradius /etc/freeradius/3.0 0.0s
    => CACHED [39/54] RUN chown -R freerad. /etc/freeradius/3.0/ 0.0s
    => CACHED [40/54] RUN mkdir -p /var/run/freeradius 0.0s
    => CACHED [41/54] RUN chown freerad. /var/run/freeradius 0.0s
    => CACHED [42/54] COPY ./freeradius.service /lib/systemd/system/ 0.0s
    => CACHED [43/54] RUN rm -rf /var/lib/apt/lists/* 0.0s
    => CACHED [44/54] COPY ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf 0.0s
    => CACHED [45/54] COPY ./php.ini /etc/php/php.ini 0.0s
    => CACHED [46/54] RUN sed -i "s/'host' => 'localhost'/'host' => 'rdmariadb'/g" /var/www/html/cake4 0.0s
    => CACHED [47/54] RUN sed -i "s/$servername = "localhost";/$servername = "rdmariadb";/g" /var/www 0.0s
    => CACHED [48/54] RUN sed -i "s/$servername = "localhost";/$servername = "rdmariadb";/g" /var/www 0.0s
    => CACHED [49/54] RUN sed -i "s/$servername = "localhost";/$servername = "rdmariadb";/g" /var/www 0.0s
    => CACHED [50/54] RUN sed -i "s/$servername = "localhost";/$servername = "rdmariadb";/g" /var/www 0.0s
    => CACHED [51/54] RUN sed -i "s/$servername = "localhost";/$servername = "rdmariadb";/g" /var/www 0.0s
    => CACHED [52/54] RUN sed -i "s/$servername = "localhost";/$servername = "rdmariadb";/g" /var/www 0.0s
    => CACHED [53/54] RUN sed -i 's/server = "localhost"/server = "rdmariadb"/g' /etc/freeradius/3 0.0s
    => CACHED [54/54] RUN cp -R /var/www/html/rd/build/production/Rd/* /var/www/html/ 0.0s
    => exporting to image 0.3s
    => => exporting layers 0.0s
    => => writing image sha256:f1a2655963b5feec4a991a1503c3e0f9c27cf2b5198a37b0de7bbe3a618254b1 0.2s
    => => naming to docker.io/library/docker_radiusdesk 0.0s

  • docker-compose up -d radiusdesk
    /usr/lib/python3/dist-packages/paramiko/transport.py:236: CryptographyDeprecationWarning: Blowfish has been deprecated
    "class": algorithms.Blowfish,
    Starting radiusdesk-mariadb ... error

ERROR: for radiusdesk-mariadb Cannot start service rdmariadb: Mounts denied:
The path /mnt/data/radiusdesk/db_conf/my_custom.cnf is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
See https://docs.docker.com/ for more info.

ERROR: for rdmariadb Cannot start service rdmariadb: Mounts denied:
The path /mnt/data/radiusdesk/db_conf/my_custom.cnf is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
See https://docs.docker.com/ for more info.
ERROR: Encountered errors while bringing up the project.

  • echo

  • echo All 'done!'
    All done!`

@akoharu
Copy link

akoharu commented Sep 24, 2023

Try with my PR #44
or try my own version https://github.com/eyzetio/rdcore

@keeganwhite
Copy link

what host OS are you using? It looks like mac. If it is then change the mount locations to something docker has access to else it won't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants