autogen/website/docs/installation/Docker.md
Step 3: Run AutoGen Applications from Docker Image  Here's how you can run an application built with AutoGen, using the Docker image:  1. **Mount Your Directory**: Use the Docker `-v` flag to mount your local application directory to the Docker container. This allows you to develop on your local machine while running the code in a consistent Docker environment. For example:     ```bash    docker run -it -v $(pwd)/myapp:/home/autogen/autogen/myapp autogen_base_img:latest python /home/autogen/autogen/myapp/main.py    ```     Here, `$(pwd)/myapp` is your local directory, and `/home/autogen/autogen/myapp` is the path in the Docker container where your code will be located.  2. **Mount your code:** Now suppose you have your application built with AutoGen in a main script named `twoagent.py` ([example](https://github.com/microsoft/autogen/blob/main/test/twoagent.py)) in a folder named `myapp`. With the command line below, you can mount your folder and run the application in Docker.     ```python    # Mount the local folder `myapp` into docker image and run the script named "twoagent.py" in the docker.    docker run -it -v `pwd`/myapp:/myapp autogen_img:latest python /myapp/main_twoagent.py    ```  3. **Port Mapping**: If your application requires a specific port, use the `-p` flag to map the container's port to your host. For instance, if your app runs on port 3000 inside Docker and you want it accessible on port 8080 on your host machine:     ```bash    docker run -it -p 8080:3000 -v $(pwd)/myapp:/myapp autogen_base_img:latest python /myapp    ```     In this command, `-p 8080:3000` maps port 3000 from the container to port 8080 on your local machine.  4. **Examples of Running Different Applications**: Here is the basic format of the docker run command.  ```bash docker run -it -p {WorkstationPortNum}:{DockerPortNum} -v {WorkStation_Dir}:{Docker_DIR} {name_of_the_image} {bash/python} {Docker_path_to_script_to_execute} ```  - _Simple Script_: Run a Python script located in your local `myapp` directory.    ```bash   docker run -it -v `pwd`/myapp:/myapp autogen_base_img:latest python /myapp/my_script.py   ```  - _Web Application_: If your application includes a web server running on port 5000.    ```bash   docker run -it -p 8080:5000 -v $(pwd)/myapp:/myapp autogen_base_img:latest   ```  - _Data Processing_: For tasks that involve processing data stored in a local directory.    ```bash   docker run -it -v $(pwd)/data:/data autogen_base_img:latest python /myapp/process_data.py   ``` 