General steps:
1. Prepare the environment on which you need to run commands
2. Add the command to be run to the image to be built
3. Run the command
E.g:
FROM python:2.7
LABEL maintainer="[email protected]"
RUN pip install flask
COPY app.py /app/
WORKDIR /app
EXPOSE 5000
CMD ["python", "app.py"]