how to run a 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: how run dockerfile
FROM node:current-slim
WORKDIR /usr/src/app
COPY package.json .
RUN npm install
EXPOSE 8080
CMD [ "npm", "start" ]
COPY . .
Example 3: start a docker container
$ docker start <container_id>
Example 4: dockerfile run app cmd
RUN apt-get install python3
CMD echo "Hello world"
ENTRYPOINT echo "Hello world"