I want to create my own Docker image using the following Dockerfile
FROM scratch
COPY apache-cassandra-3.11.6-bin.tar.gz .
RUN tar -xzf apache-cassandra-3.11.6-bin.tar.gz
When I run the command, the tar instruction fails. Why? I am on Windows 10.
C:\Users\manuc\Documents\manu\cassandra_image_test>docker build -f CassandraImageDockerFile.txt -t manucassandra .
Sending build context to Docker daemon 184.8MB
Step 1/3 : FROM scratch
--->
Step 2/3 : COPY apache-cassandra-3.11.6-bin.tar.gz .
---> Using cache
---> deda426d6948
Step 3/3 : RUN tar -xzf apache-cassandra-3.11.6-bin.tar.gz .
---> Running in 3edfb1031c06
OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown
Could it be that because I am not using an existing image, tar
is not present in the image and thus tar
is failing?