Skip to content

Commit

Permalink
Remove wtf container
Browse files Browse the repository at this point in the history
  • Loading branch information
robwaz committed Aug 6, 2024
1 parent 8e445ec commit 1063d55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pwnshop/challenges/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,16 +279,16 @@ def _containerized_build(self, cmd, source):
os.makedirs(f"{workdir}/lib", exist_ok=True)
client = docker.from_env()
img, tag = self.build_image.split(':')
#client.images.pull(img, tag=tag)
client.images.pull(img, tag=tag)

#TODO: container life is context manager
container = client.containers.run('wtf',
container = client.containers.run(img + ':' + tag,
'sleep 300',
auto_remove=True,
detach=True,
volumes = {workdir : {'bind': cont_vpath,
'mode': 'rw'}})
#code, out = container.exec_run('/bin/bash -c "apt update && apt install -y gcc patchelf && mkdir -p /tmp/pwnshop"')
code, out = container.exec_run('/bin/bash -c "apt update && apt install -y gcc patchelf && mkdir -p /tmp/pwnshop"')
with open(f'{workdir}/source.c', 'w+') as f:
f.write(source)

Expand Down

0 comments on commit 1063d55

Please sign in to comment.