Advertisement
petrikjosef

Untitled

Apr 2nd, 2022
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. #muj kod
  2. FROM strapi/base
  3.  
  4. # Let WatchTower know to ignore this container for checking
  5. LABEL com.centurylinklabs.watchtower.enable="false"
  6.  
  7. WORKDIR /app
  8.  
  9. COPY ./package*.json ./
  10.  
  11. RUN npm ci
  12.  
  13. COPY . .
  14.  
  15. ENV NODE_ENV production
  16.  
  17. RUN npm run build
  18.  
  19. EXPOSE 1337
  20.  
  21.  
  22.  
  23.  
  24. #Tvůj kod
  25.  
  26. FROM debian:buster
  27. RUN echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list
  28.  
  29. RUN apt-get update && apt-get install -y openssh-client apt-utils \
  30. && ssh-keygen -A \
  31. && mkdir /root/.ssh \
  32. && chmod 0700 /root/.ssh \
  33. && echo "root:Abeceda01." | chpasswd
  34.  
  35. # sshd
  36. RUN mkdir /var/run/sshd; \
  37. apt install -y openssh-server; \
  38. sed -i 's/^#\(PermitRootLogin\) .*/\1 yes/' /etc/ssh/sshd_config; \
  39. sed -i 's/^\(UsePAM yes\)/# \1/' /etc/ssh/sshd_config; \
  40. apt clean;
  41.  
  42. RUN sed -e 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' -i /etc/ssh/sshd_config
  43.  
  44.  
  45. RUN mkdir -p /etc/ssh
  46.  
  47.  
  48. RUN echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGG1e5glp3eyGQTg8h0E1OXQ+22DI4qhIxqgxxgt6gLZsiIrc8wU2mUYpU5JEaQcJisuJROq/O3NBzR8agV8IaLtNmOiMin8kcJFq5WD8EH3SXe+ux82OY9+K+qKZzeovP2hTMryt3Ffd45i1Bzm1vg1llBo1U03LmqNq105y1JsKIoD125sXbfvclWqB675tVB27i+b+tTWZ+SZmY7y8ClnL8i8VOKrFEjcCufcPQUCSSGApY421j112/4JP1kK35DJejVxCEvMsoP8fznk51HwALTcM0Sc6MIL7eKZUiUsZlWuOQT1bb6liXM66Bqrawwu30+rZ3lcA3Io9nYBk7 mac13@mac-macbook-pro" >> /root/.ssh/authorized_keys
  49.  
  50. RUN apt-get install mc -y
  51. RUN apt-get install rsync -y
  52.  
  53. EXPOSE 11122
  54.  
  55.  
  56.  
  57. CMD ["npm", "start"]
  58. CMD ["/usr/sbin/sshd", "-D", "-e"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement