# Use the official n8n Docker image as the base image FROM docker.n8n.io/n8nio/n8n@sha256:9caf109e2293557568ab687b9d6c82646250c8ab7dcb20479c8bef9956811b7a # Use the secret securely during the build process RUN --mount=type=secret,id=N8N_AUTH_PASSWORD,mode=0444,required=true \ export N8N_BASIC_AUTH_PASSWORD=$(cat /run/secrets/N8N_AUTH_PASSWORD) # Set environment variables for n8n ENV GENERIC_TIMEZONE="Asia/Dubai" \ TZ="Asia/Dubai" \ N8N_BASIC_AUTH_ACTIVE="true" \ N8N_BASIC_AUTH_USER="admin" \ N8N_EDITOR_BASE_URL="https://derek-thomas-n8n.hf.space" \ N8N_HOST="0.0.0.0" \ N8N_PROTOCOL="https" # Set the working directory WORKDIR /data # Expose port 5678 (default port for n8n) EXPOSE 5678 # Command to run n8n ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]