How to create a docker container, in a python script, which runs a python script in the container?
I’m creating a website similar to leetcode where users can submit code. I’ll be running this code in a docker container for security measures. My code isn’t behaving how I was expecting it to. I’ve written this script which displays the problem. Also I’m doing this on an m1 macbook.
/bin/sh: docker: command not found when running a script from Python, but works in terminal
I’m trying to run Docker commands from a Python script using the subprocess module. However, I keep getting the error /bin/sh: docker: command not found
. When I run the same command in the terminal, it works fine.