### Launch container into Python shell Source: https://github.com/alexdlaird/pyngrok-docker/blob/main/README.md Starts the container and enters a Python shell. Requires the NGROK_AUTHTOKEN environment variable to be set. ```sh docker run -e NGROK_AUTHTOKEN=$NGROK_AUTHTOKEN -it alexdlaird/pyngrok ``` -------------------------------- ### Launch Docker Compose services Source: https://github.com/alexdlaird/pyngrok-docker/blob/main/README.md Starts the services defined in the docker-compose.yml file in detached mode. ```shell docker compose up -d ``` -------------------------------- ### Launch container into bash shell Source: https://github.com/alexdlaird/pyngrok-docker/blob/main/README.md Starts the container and enters a bash shell instead of the default Python environment. ```sh docker run -e NGROK_AUTHTOKEN=$NGROK_AUTHTOKEN -it alexdlaird/pyngrok /bin/bash ``` -------------------------------- ### Instantiate container with Docker Compose Source: https://github.com/alexdlaird/pyngrok-docker/blob/main/README.md Defines a service that runs a custom Python script on startup and exposes the web inspector port. ```yaml services: ngrok: image: alexdlaird/pyngrok env_file: ".env" command: [ "python", "/root/my-script.py" ] volumes: - ./my-script.py:/root/my-script.py ports: - "127.0.0.1:4040:4040" ``` -------------------------------- ### Run ngrok via Docker Source: https://github.com/alexdlaird/pyngrok-docker/blob/main/README.md Executes the ngrok binary within the container using the provided NGROK_AUTHTOKEN environment variable. ```sh docker run -e NGROK_AUTHTOKEN=$NGROK_AUTHTOKEN -it alexdlaird/pyngrok ngrok http 80 ``` -------------------------------- ### Docker Image Tag Format Source: https://github.com/alexdlaird/pyngrok-docker/blob/main/README.md Defines the naming convention for multi-architectural images using Python version, distribution, and container version. ```sh alexdlaird/pyngrok:py$PYTHON_VERSION-$DISTRO-$VERSION ``` -------------------------------- ### Mount custom ngrok config file Source: https://github.com/alexdlaird/pyngrok-docker/blob/main/README.md Overrides the default configuration by mounting a local ngrok.yml file to the container's expected config path. ```sh docker run -v ./ngrok.yml:/root/.config/ngrok/ngrok.yml -it alexdlaird/pyngrok ``` -------------------------------- ### Expose web inspector port Source: https://github.com/alexdlaird/pyngrok-docker/blob/main/README.md Maps the container's web inspector port to the host machine. Ensure the configuration sets web_addr to 0.0.0.0:4040. ```sh docker run --env-file .env -p 127.0.0.1:4040:4040 -it alexdlaird/pyngrok ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.