cli icon indicating copy to clipboard operation
cli copied to clipboard

option to save Dockerfile from `fn build` ?

Open rdallman opened this issue 7 years ago • 1 comments
trafficstars

The problem is that after a user does 0->1 and they want to do more complex stuff 1->2 (add template files, additional dependencies, gifs of cats, you name it), a user has to dig around in our various examples to get a Dockerfile that they can add additional build information / files to (at least, currently it's very 'magic' and it's not clear how to go about doing 1->2). This won't always be the case, but it seems like it's at least a probable case.

currently, we write a Dockerfile to a tmp file that is removed after fn build / fn run / etc. and there's no way to get the contents of that file out easily. At least, this is my interpretation of a problem a user had in getting started very recently, and what we did to get over the hump was to comment out the code that removes the file, copy it, and modify it as neither of us could find a Dockerfile anywhere in the examples that just worked, when fn run did.

some options:

  • fn run --save-dockerfile -> save $PWD/Dockerfile with contents
  • fn run --cat-dockerfile -> print contents of Dockerfile to stdout before Building image.....
  • ${your_idea_here} ?

rdallman avatar Mar 09 '18 01:03 rdallman

related to #383

josephholsten avatar Sep 18 '18 23:09 josephholsten