Skip to content

Commit 9fe6f5b

Browse files
committed
Update Run Docker
1 parent 4efab32 commit 9fe6f5b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

run-docker.sh

100644100755
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Pull the latest Ubuntu image
4+
docker pull ubuntu:latest
5+
6+
# Run a container from the Ubuntu image in detached mode with a custom name 'USPython' and share the Docker socket and binary
7+
docker run -dit --name USPython -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker ubuntu:latest
8+
9+
# Update package lists and install necessary packages in the running container
10+
docker exec USPython bash -c "apt-get update && apt-get install -y sudo git docker-compose python3 python3-yaml"
11+
12+
# Clone the specified GitHub repository into the container
13+
docker exec USPython git clone https://github.com/polarnaldo/USPython
14+
15+
# Run the specified Python script within the container
16+
docker exec -it USPython python3 /USPython/USPython.py -m interface

0 commit comments

Comments
 (0)