Created container from image made some changes used docker diff command to see the changes and created image of container and then created another container of the updated image so that created file was visible to me in the new container.
Steps to create Dockerfile
Create a file named Dockerfile
Add instructions in Dockerfile
Build Dockerfile to create image
Run image to create container
To create image out of Dockerfile
docker build -t myimage
docker ps -a
docker images
Then to create container from image
docker run -it --named container4 myimage /bin/bash
Instructions in Dockerfile
FROM- The base image
RUN- To execute commands
LABEL- Author
COPY- To copy files from source to destination
ADD- To add URL's or download files and extract tar files
EXPOSE- To expose ports
WORKDIR- To set working directory
CMD- To specify default commands to run when a container starts
ENV- To define environment variable