docker compose specify workdir code example
Example 1: docker compose run
# One single docker-compose.yml file
docker-compose up --build -d --remove-orphans
# Specify docker-compose.yml file to run
docker-compose -f docker-compose.yml up --build -d --remove-orphans
Example 2: docker expose port
docker run -p [external]:[Internal]
#example (will open in localhost:8080 to container port 80)
docker run -p 8080:80