Download Dockerfile from binary1ne/ADDC: direct link, hf CLI and curl.
- Browser
- Download file 1.32 kB
-
https://huggingface.co/spaces/binary1ne/ADDC/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/binary1ne/ADDC/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/binary1ne/ADDC/resolve/main/Dockerfile
1.32 kB
| # Use Alpine as the base image | |
| FROM python:3.10-alpine | |
| # Install system dependencies and libraries required for Samba, LDAP, Webmin, and Gradio | |
| RUN apk update && apk add --no-cache \ | |
| bash \ | |
| perl \ | |
| samba \ | |
| libsasl \ | |
| libldap \ | |
| openldap-dev \ | |
| libressl-dev \ | |
| build-base \ | |
| python3-dev \ | |
| libffi-dev \ | |
| gcc \ | |
| musl-dev \ | |
| openldap-dev \ | |
| samba-client \ | |
| && pip install --no-cache-dir \ | |
| gradio \ | |
| ldap3 \ | |
| smbprotocol | |
| # Install Webmin (manually as it isn't available in Alpine's package manager) | |
| RUN apk add --no-cache wget && \ | |
| wget https://github.com/webmin/webmin/releases/download/1.979/webmin-1.979.tar.gz && \ | |
| tar -xvzf webmin-1.979.tar.gz && \ | |
| cd webmin-1.979 && \ | |
| ./setup.sh /usr/local/webmin && \ | |
| rm -rf /webmin-1.979 /webmin-1.979.tar.gz | |
| # Create the directory for the app | |
| WORKDIR /app | |
| # Copy the Gradio app code into the container | |
| COPY gradio_app.py /app/gradio_app.py | |
| # Expose required ports: Webmin (10000), Gradio (7860), and Samba (445) | |
| EXPOSE 7860 10000 445 | |
| # Provision Samba Domain (optional) | |
| RUN samba-domain-provision | |
| # Add a script to manage Samba, Webmin, and Gradio | |
| COPY start.sh /start.sh | |
| RUN chmod +x /start.sh | |
| # Start Samba, Webmin, and Gradio | |
| CMD ["/start.sh"] | |