for those who are getting error , use RUN echo 'dl-cdn.alpinelinux.org/alpine/v3.6/main' >> /etc/apk/repositories RUN echo 'dl-cdn.alpinelinux.org/alpine/v3.6/community' >> /etc/apk/repositories RUN apk update RUN apk add mongodb=3.4.4-r0
In order to preserve the data in the container, we use VOLUME mapping this mapping helps to map the data to outside of the container with specific path after the container exists these data still available in that path.
Hitesh, Followed your instructions, created Dockerfile in the same way, containers gets created but as I try to run container getting error "docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: \"mongodb\": executable file not found in $PATH": unknown." James also got same error, can you tell how to fix this, how to set \"mongodb\": in the $PATH. How to set up [ath without accessing container Regards, Divanshu
While running build command following error is shown: ========= fetch dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz ERROR: dl-cdn.alpinelinux.org/alpine/v3.11/main: temporary error (try again later) =======
Hi HItesh, After 8:58 timeline on the video, when i m testing docker start image id, its failing with error raj.kumar@RAJKUM-BLRM20 mongo-image % docker start 40970a74869b Error response from daemon: No such container: 40970a74869b Error: failed to start containers: 40970a74869b Can anyone help here ? I m stuck here not able to find solution even on google.
Assalam o alikum what is the difference between Volume in Dockerfile and -v argument in running container command ?( not able to understand Volume in this video) Q2: what is different between COPY and ADD in Dockerfile? Please answer these question !!!!