Our Docker file:
FROM docker:18.09.6
ENV APP_NAME cs
ENV APP_INSTALL_PATH /opt/${APP_NAME}
WORKDIR ${APP_INSTALL_PATH}
COPY . .
RUN apk add --no-cache iptables bash
ENTRYPOINT [ "./script.sh" ]
When we run the sudo docker build -t test1 --no-cache .
Expected behavior
It should build the image named as test1
Actual behavior
- Its not moving after this command → RUN apk add --no-cache iptables bash and the VM also gets disconnected.
Output:
Sending build context to Docker daemon 35.33kB
Step 1/7 : FROM docker:18.09.6
---> 934a309d24c1
Step 2/7 : ENV APP_NAME cs
---> Running in c1fb5de061db
Removing intermediate container c1fb5de061db
---> 1e08921f410e
Step 3/7 : ENV APP_INSTALL_PATH /opt/${APP_NAME}
---> Running in e24b5224d512
Removing intermediate container e24b5224d512
---> 64a71f9d2e02
Step 4/7 : WORKDIR ${APP_INSTALL_PATH}
---> Running in cb923df91de2
Removing intermediate container cb923df91de2
---> 61470d509e95
Step 5/7 : COPY . .
---> 2d2145d86a9d
Step 6/7 : RUN apk add --no-cache iptables bash
---> Running in 4c66e9fd3227
Thanks in Advance for the support.