docker run Dockerfile code example
Example 1: docker compose run
docker-compose up --build -d --remove-orphans
docker-compose -f docker-compose.yml up --build -d --remove-orphans
Example 2: docker run name
docker run --name <container name> -dp <local port>:<container port> <image>
Example 3: docker run command on container
sudo docker exec -it <container name> <command>
Example 4: docker expose port
docker run -p [external]:[Internal]
docker run -p 8080:80
Example 5: docker ARG
$ docker build --build-arg some_variable_name=a_value
Example 6: dockerfile example
FROM ubuntu:18.04
COPY . /app
RUN make /app
CMD python /app/app.py