I am new to this Containerization and I was wondering how Docker could replace Virtual machines?
I am given a case study in which there are 2 virtual machines each acting as a virtual server, one is a Development server and the other is a Test Server and I am asked to study how Docker could help in managing the workflow efficiently.
In this case the 2 virtual Machines are Servers and the idea of Docker replacing virtual machines is confusing me.
can anyone help me understand this concept.
Thanks in Advance!!
I am not sure how a server can be completely replaced by a docker container, so I am assuming you want to replace an 2 applications running in 2 servers into 1 server running 2 containers of each test and dev apps.
I am going to make a few assumptions before I can answer.
Docker Basics
Docker Registry - The place from where you can download base images So here it goes,
Setup docker on a unix server.
A sample dockerfile would look like something below
FROM webspher-liberty17:webProfile7
ENV SERVER_NAME=myapptestserver
RUN ["/bin/bash", "-c", "/opt/ibm/wlp/bin/server create $SERVER_NAME"]
EXPOSE 9080 9443
COPY server.xml jvm.options /opt/ibm/wlp/usr/servers/$SERVER_NAME/
COPY *.war /opt/ibm/wlp/usr/servers/$SERVER_NAME/dropins/
CMD ["/opt/ibm/docker/docker-server", "run", "myapptestserver"]
Now when you do a docker build of this docker file, it would create an image with base layer as ibm liberty. Every command after the FROM allows you to add an additional layer, so you can customize to your specifics.
Once you have done the above for both your apps, you practically have two variants of your app running on same server but serving two different environments.
Best part, add this to your CI/CD pipeline in bamboo/jenkins, and you can bring up and down environments in a jiffy.