Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #muj kod
- FROM strapi/base
- # Let WatchTower know to ignore this container for checking
- LABEL com.centurylinklabs.watchtower.enable="false"
- WORKDIR /app
- COPY ./package*.json ./
- RUN npm ci
- COPY . .
- ENV NODE_ENV production
- RUN npm run build
- EXPOSE 1337
- #Tvůj kod
- FROM debian:buster
- RUN echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list
- RUN apt-get update && apt-get install -y openssh-client apt-utils \
- && ssh-keygen -A \
- && mkdir /root/.ssh \
- && chmod 0700 /root/.ssh \
- && echo "root:Abeceda01." | chpasswd
- # sshd
- RUN mkdir /var/run/sshd; \
- apt install -y openssh-server; \
- sed -i 's/^#\(PermitRootLogin\) .*/\1 yes/' /etc/ssh/sshd_config; \
- sed -i 's/^\(UsePAM yes\)/# \1/' /etc/ssh/sshd_config; \
- apt clean;
- RUN sed -e 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' -i /etc/ssh/sshd_config
- RUN mkdir -p /etc/ssh
- RUN echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGG1e5glp3eyGQTg8h0E1OXQ+22DI4qhIxqgxxgt6gLZsiIrc8wU2mUYpU5JEaQcJisuJROq/O3NBzR8agV8IaLtNmOiMin8kcJFq5WD8EH3SXe+ux82OY9+K+qKZzeovP2hTMryt3Ffd45i1Bzm1vg1llBo1U03LmqNq105y1JsKIoD125sXbfvclWqB675tVB27i+b+tTWZ+SZmY7y8ClnL8i8VOKrFEjcCufcPQUCSSGApY421j112/4JP1kK35DJejVxCEvMsoP8fznk51HwALTcM0Sc6MIL7eKZUiUsZlWuOQT1bb6liXM66Bqrawwu30+rZ3lcA3Io9nYBk7 mac13@mac-macbook-pro" >> /root/.ssh/authorized_keys
- RUN apt-get install mc -y
- RUN apt-get install rsync -y
- RUN mkdir /zalohy
- CMD ["npm", "start"]
- CMD ["/usr/sbin/sshd", "-D", "-e"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement