I have created a Docker container using the Ubuntu 16.04 image.
docker run -it -d --name containername -v /var/www/public --privileged ubuntu
If you use docker-compose, just add one line to your docker-compose.yml
file.
version: '3'
services:
ubuntu-local:
image: ubuntu:16.04
restart: on-failure
command: python3 run_my_code.py
working_dir: /code
volumes:
- ./code:/code
- /etc/localtime:/etc/localtime:ro # <--add this line to set timezone
environment:
- PYTHONUNBUFFERED=1