RUN bash-c 'touch / app.jar' in dockerfile

ADD eureka-server-0.0.1-SNAPSHOT.jar app.jar

RUN bash-c "touch / app.jar"

what is the meaning and purpose of this line of RUN bash-c "touch / app.jar" command?

Mar.07,2021

from the point of view of the command itself, it is to execute a touch command. The previous add command copies the jar, and the later touch command modifies the file's access time and modification time to the current time.

Menu