Advertisement
Kocyk

dockerfile

Oct 21st, 2022
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. FROM alpine
  2.  
  3. WORKDIR /usr/app
  4.  
  5. EXPOSE 8080
  6.  
  7. RUN apk add --update nodejs npm
  8.  
  9. RUN apk add --update npm
  10.  
  11. RUN apk add openssh
  12.  
  13. RUN apk add git
  14.  
  15. RUN mkdir -p /root/.ssh
  16.  
  17. RUN touch /root/.ssh/id_rsa
  18.  
  19. RUN touch /root/.ssh/id_rsa.pub
  20.  
  21. RUN touch /root/.ssh/known_hosts
  22.  
  23. RUN ssh-keyscan -t rsa github.com > /root/.ssh/known_hosts
  24.  
  25. RUN chmod 600 /root/.ssh/id_rsa
  26.  
  27. RUN chmod 600 /root/.ssh/id_rsa.pub
  28.  
  29. COPY ./id_rsa.pub /root/.ssh/id_rsa.pub
  30.  
  31. COPY ./id_rsa /root/.ssh/id_rsa
  32.  
  33. RUN chmod 400 /root/.ssh/id_rsa
  34.  
  35. RUN chmod 400 /root/.ssh/id_rsa.pub
  36.  
  37. RUN touch /root/.ssh/config
  38.  
  39. RUN chmod 700 /root/.ssh/config
  40.  
  41. RUN echo $'Host git \n HostName github.com \n AddKeysToAgent yes \n PreferredAuthentications publikey \n IdentityFile /root/.ssh/id_rsa' > /root/.ssh/config
  42.  
  43. RUN git clone git@github.com:itskck/Simpleweb.git .
  44.  
  45. RUN ls -las
  46.  
  47. RUN npm -g outdated
  48.  
  49. RUN npm -g update
  50.  
  51. RUN npm install
  52.  
  53. CMD npm start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement