Spaces:
Sleeping
Sleeping
Download Dockerfile from edutello/tello-23: direct link, hf CLI and curl.
- Browser
- Download file 2.99 kB
-
https://huggingface.co/spaces/edutello/tello-23/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/edutello/tello-23/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/edutello/tello-23/resolve/main/Dockerfile
2.99 kB
| FROM ubuntu:latest | |
| RUN apt update -y | |
| RUN apt upgrade -y | |
| RUN apt install -y php curl unzip wget xz-utils php-xml php-curl php-mysql php-pdo php-mbstring | |
| RUN rm -rf /var/lib/apt/lists/* | |
| USER ubuntu | |
| ENV HOME=/home/ubuntu \ | |
| PATH=/home/ubuntu/.local/bin:$PATH | |
| WORKDIR $HOME | |
| RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
| RUN php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
| RUN php composer-setup.php | |
| RUN php -r "unlink('composer-setup.php');" | |
| USER root | |
| RUN mv composer.phar /usr/local/bin/composer | |
| USER ubuntu | |
| RUN wget https://nodejs.org/dist/v20.18.1/node-v20.18.1-linux-x64.tar.xz | |
| RUN chmod 777 ./node-v20.18.1-linux-x64.tar.xz | |
| RUN tar -xf './node-v20.18.1-linux-x64.tar.xz' | |
| USER root | |
| RUN cp -r $HOME/node-v20.18.1-linux-x64/bin $HOME/node-v20.18.1-linux-x64/include $HOME/node-v20.18.1-linux-x64/lib $HOME/node-v20.18.1-linux-x64/share /usr/ | |
| USER ubuntu | |
| RUN mkdir example-app | |
| WORKDIR $HOME/example-app | |
| COPY --chown=ubuntu app/ ./ | |
| RUN chmod 777 -R $HOME/example-app | |
| RUN composer install | |
| RUN composer clear-cache | |
| RUN php artisan cache:clear | |
| RUN php artisan config:clear | |
| RUN php artisan config:cache | |
| RUN composer clear-cache | |
| RUN composer install | |
| RUN npm install | |
| RUN cp $HOME/example-app/.env.example $HOME/example-app/.env | |
| RUN php artisan key:generate | |
| #RUN mkdir -p $HOME/example-app/public/storage/images | |
| RUN chmod 777 -R $HOME/example-app | |
| RUN chown -R ubuntu:ubuntu $HOME/example-app | |
| CMD \ | |
| pwd && \ | |
| ls storage -la && \ | |
| sed -i "s|\$DB-DATABASE|$DB_DATABASE|" .env && \ | |
| sed -i "s|\$DB-USERNAME|$DB_USERNAME|" .env && \ | |
| sed -i "s|\$DB-HOST|$DB_HOST|" .env && \ | |
| sed -i "s|\$DB-PORT|$DB_PORT|" .env && \ | |
| sed -i "s|\$DB-PASSWORD|$DB_PASSWORD|" .env && \ | |
| composer clear-cache; composer install; chown -R ubuntu:ubuntu $HOME/example-app; php artisan storage:link; chmod 777 -R $HOME/example-app; php artisan migrate; php artisan migrate:status; \ | |
| echo ========== factory 1 ============; \ | |
| echo ========== factory x ============; \ | |
| echo ========== factory AlumnoSeeder ============; \ | |
| #php artisan db:seed --class=AlumnoSeeder;\ | |
| echo ========== factory CalificacionSeeder ============; \ | |
| #php artisan db:seed --class=CalificacionSeeder;\ | |
| echo ========== factory JustificanteSeeder ============; \ | |
| #php artisan db:seed --class=JustificanteSeeder;\ | |
| echo ========== factory UsuarioSeeder ============; \ | |
| #php artisan db:seed --class=UsuarioSeeder;\ | |
| echo ========== factory AvisoSeeder ============; \ | |
| #php artisan db:seed --class=AvisoSeeder;\ | |
| echo ========== factory JustificanteMaestroSeeder ============; \ | |
| :php artisan db:seed --class=JustificanteMaestroSeeder;\ | |
| echo ========== factory ReporteSeeder ============; \ | |
| #php artisan db:seed --class=ReporteSeeder; \ | |
| php artisan serve --host=0.0.0.0 --port=7860 |