I am an new bee to Docker and i am trying to create/use the existing image to bring up my application. After reading couple of stackoverflow posts and Docker documentations I was able bring up my application using Docker containers. Now I am looking for correct way to saving the modified Docker container, So that I can reuse the container to bring up my application by running docker command.
I see people use $docker commit to save the docker container. If i run this command, where does the container gets saved ? will anybody else able to download my saved container ?
I am planning to deploy the saved docker container to the AWS cloud as well.
Any suggestions or comments on this would be helpful.
Update to the post Here is my dockerfile which i use to download and build the container
FROM tomcat:7.0.82-jre8
RUN apt-get update && apt-get -y upgrade
WORKDIR /usr/local/tomcat
COPY /app.war /usr/local/tomcat/webapps/app.war
RUN unzip /usr/local/tomcat/webapps/app.war -d /usr/local/tomcat/webapps/app
RUN apt-get update && apt-get install -y dos2unix
EXPOSE 8080
COPY tomcat-users.xml /usr/local/tomcat/conf/
COPY config1.xml /usr/local/tomcat/webapps/app/conf/
COPY config2.properties /usr/local/tomcat/webapps/app/conf/properties/
COPY config4.properties /usr/local/tomcat/webapps/app/conf/
ENV JAVA_OPTS="-Xms2G -Xmx2G"
# Copy Entrypoint script in the container
COPY ./docker-entrypoint.sh /
RUN dos2unix /docker-entrypoint.sh && apt-get --purge remove -y dos2unix && rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/docker-entrypoint.sh"]