Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List all files in Build Context and/or in WORKDIR when building container image

I am trying to build a container image using Docker task on Azure Pipeline. I created a dockerfile, but it looks like a made a mistake cause I keep getting

WARN saveError ENOENT: no such file or directory, open '/usr/src/app/package.json'

I thought it would be good to list all files that exist in build context and/or WORKDIR so it would be easier for me to find a solution.

Is there any appropriate dockerfile command, something like...

dir

ls

like image 347
helpME1986 Avatar asked Nov 16 '19 15:11

helpME1986


Video Answer


1 Answers

RUN. You can run any command you want in a container.

RUN ls will run ls and print the output of the command.

like image 73
Daniel Mann Avatar answered Oct 17 '22 08:10

Daniel Mann