Hi all, with regard to the above question - I need some basic help. My requirement is that I am trying to put in some Django code into a Docker container.
This is the Docker file, check it out:
FROM ubuntu:latest
MAINTAINER { myname }
#RUN echo "deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -sc) main universe" >> /etc/apt/sou$
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tar git curl dialog wget net-tools nano buil$
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python python-dev python-distribute python-p$
RUN mkdir /opt/app
WORKDIR /opt/app
#Pull Code
RUN git clone git@bitbucket.org/{user}/{repo}
RUN pip install -r website/requirements.txt
#EXPOSE = ["8000"]
CMD python website/manage.py runserver 0.0.0.0:8000
So, after this I go about to build the code using the regular build command which is:
docker build -t dockerhubaccount/Edureka:v1
And I know what this does. It basically pulls all the code from the repository which is Bitbucket in this scenario and put it to the container, correct?
Later after the build process is done, I run the code using the following syntax:
docker run -p 8000:8080 -td Anirudh/Edureka:v1
After this, things run fine as usual. But, since I used git clone I have this tiny ambiguity in my head.
There are the basic questions I have:
1. In your opinion, what is the fest workflow recommended for this kind of usage?
2. Is it possible to update the code (how?) when I make new commits and build it by storing in the container?
All help appreciated!