Home > other >  Docker build Dockfile cannot perform the CD command
Docker build Dockfile cannot perform the CD command

Time:09-27

Dockerfile:
The RUN apt - get - yqq update
The RUN apt - get the install make
RUN the mkdir/var/redis
COPY redis - 3.0.5. Tar. Gz/var/redis/
The RUN tar ZXVF/var/redis/redis - 3.0.5. Tar. Gz
CD/var/RUN redis/redis - 3.0.5/& amp; & Make & amp; & Make install


The ADD redis - tools. Deb/var/redis
The RUN CD/var/redis & amp; & DPKG -i redis - tools. Deb


VOLUME ["/var/lib/redis ", "/var/log/redis/"]

EXPOSE 6379
CMD []
Error:


Ask why can't find the CD command?

CodePudding user response:

WORKDIR you to switch the directory, and then RUN

CodePudding user response:

You don't have access to the directory to/var/redis for decompression, ensure that enter the directory/var/redis unzip the command again
  • Related