You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Navigate to the root directory of the project and build the Docker image using the following command:
36
+
37
+
```sh
38
+
docker build -t leetcode-solutions .
39
+
```
40
+
41
+
### Running the Docker Container
42
+
43
+
Once the image is built, you can run the container with the following command:
44
+
45
+
```sh
46
+
docker run -it --rm leetcode-solutions
47
+
```
48
+
49
+
This command will start a container and open an interactive shell session where you can work with the project.
50
+
51
+
### Accessing Project Files
52
+
53
+
To access project files from within the Docker container, you can mount the project directory as a volume. Use the following command:
54
+
55
+
```sh
56
+
docker run -it --rm -v $(pwd):/app leetcode-solutions
57
+
```
58
+
59
+
This command mounts the current directory (where you run the command) to the `/app` directory in the container, allowing you to access and modify files as needed.
60
+
61
+
### Stopping the Docker Container
62
+
63
+
To stop the Docker container, you can use the `exit` command or press `Ctrl + D` in the terminal where the container is running.
0 commit comments