Download Dockerfile from Rovatiana/test_ruby: direct link, hf CLI and curl.
- Browser
- Download file 565 Bytes
-
https://huggingface.co/spaces/Rovatiana/test_ruby/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Rovatiana/test_ruby/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Rovatiana/test_ruby/resolve/main/Dockerfile
565 Bytes
| # Dockerfile | |
| FROM ruby:3.2.2-slim | |
| # Installer les dépendances système | |
| RUN apt-get update -qq && \ | |
| apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Copier le Gemfile et Gemfile.lock d'abord | |
| COPY Gemfile Gemfile.lock ./ | |
| # Installer les gems dans le système plutôt que dans le bundle | |
| RUN bundle install --system | |
| # Copier le reste de l'application | |
| COPY . . | |
| EXPOSE 7860 | |
| # Définir l'utilisateur non-root pour la sécurité | |
| USER 1000 | |
| CMD ["ruby", "app.rb", "-o", "0.0.0.0", "-p", "7860"] |