Skip to content

Instantly share code, notes, and snippets.

@PierreBeucher
Created February 19, 2024 12:03
Show Gist options
  • Save PierreBeucher/eb17e3c8913da86978086c2a2b6adb7b to your computer and use it in GitHub Desktop.
Save PierreBeucher/eb17e3c8913da86978086c2a2b6adb7b to your computer and use it in GitHub Desktop.
echo """
FROM debian:bookworm-20240130-slim
RUN apt update && apt install -y python3 zsh bash
""" > Dockerfile
echo """
val = input()
print('export FOO=' + val)
""" > prog.py
docker build . -t python-zsh:local
echo 'Run this command in containers: source <(python3 prog.py)'
echo "bash (ok)"
docker run -it -v $PWD/prog.py:/prog.py python-zsh:local bash
echo "zsh (freeze)"
docker run -it -v $PWD/prog.py:/prog.py python-zsh:local zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment