Created
June 20, 2019 03:01
-
-
Save pasknel/c1438fa4fe8ba2bfa1e19537ac949e0b to your computer and use it in GitHub Desktop.
Create a new container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import docker | |
client = docker.from_env() | |
image = "alpine" | |
c = client.containers.run(image, detach = True, tty = True) | |
print "[+] New container created: {0} ({1})".format(c.short_id, c.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment