I have a directory structure as follows.
- app
Dockerfile
- target
- test_app.tar.gz
The extraction of the tar.gz will have the following,
- lib
- conf
- bin
I would like to extract and add lib/* folder to the docker image.
FROM docker.hub.com/alpine/jdk1.8:latest
RUN mkdir -p /service \
/service/app_lib \
/service/lib
COPY target/test_app.tar.gz /service/app_lib/
RUN cd /service/app_lib/
RUN tar -xzf test_app.tar.gz
RUN rm test_app.tar.gz
RUN cd lib
COPY * /service/lib/
RUN rm app_lib
Getting the below error with this.
Step 5/11 : RUN tar -xzf test_app.tar.gz
---> Running in edde27a1cc60
tar (child): test_app.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Not sure what is wrong with this.