diff --git a/fake_home/.vim/templates/Dockerfile b/fake_home/.vim/templates/Dockerfile new file mode 100644 index 0000000..494ffdb --- /dev/null +++ b/fake_home/.vim/templates/Dockerfile @@ -0,0 +1,18 @@ +FROM node:alpine + +RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app +RUN mkdir -p /secrets && chown -R node:node /secrets + +WORKDIR /home/node/app + +COPY package*.json ./ + +USER node + +RUN npm ci + +COPY --chown=node:node . . + +EXPOSE 3001 + +CMD ["npm", "start"] diff --git a/fake_home/.vimrc b/fake_home/.vimrc index e2b05bf..9d5381c 100644 --- a/fake_home/.vimrc +++ b/fake_home/.vimrc @@ -170,6 +170,7 @@ if has ("autocmd") autocmd BufNewFile *.js 0r ~/.vim/templates/skeleton.js autocmd BufNewFile *.json 0r ~/.vim/templates/skeleton.json autocmd BufNewFile Makefile 0r ~/.vim/templates/Makefile + autocmd BufNewFile Dockerfile 0r ~/.vim/templates/Dockerfile augroup END endif