I have the following working dockerfile,
#using python3.6 image
FROM python:3.6
ENV PYTHONUNBUFFERED 1
#Installing required packages
RUN apt-get update
RUN apt-get install libsasl2-dev libldap2-dev libssl-dev python3-dev psmisc -y
#Installing a pip package which has django project in-built
RUN pip install <pip-package>
#Running a script-> appmanage.py, which installs a app to django project
RUN appmanage.py appconfig
#Running the django development server.
CMD ["manage.py","runserver","0.0.0.0:8000"]
How can i design a okd/openshift template yaml/json for this? I prefer a template in which the docker image-build will be handled in the template itself, instead of building a image with docker build and using the image name with tag in template.