Created
June 30, 2023 21:12
-
-
Save MattSandy/eacde5d49b6b7d829985ebc6b3eb4e4d to your computer and use it in GitHub Desktop.
Another way to get sftp access to docker volume
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:latest | |
# Install SSH server and SFTP | |
RUN apt-get update && apt-get install -y openssh-server | |
RUN mkdir /var/run/sshd | |
# Create a new user 'sftpuser' with password 'password' (replace with your own credentials) | |
RUN useradd -rm -d /home/sftpuser -s /bin/bash -g root -G sudo -u 1001 sftpuser | |
RUN echo 'sftpuser:password' | chpasswd | |
# Configure SSH | |
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin no/' /etc/ssh/sshd_config | |
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config | |
# Mount the specified directory to /media | |
VOLUME /media | |
RUN chown sftpuser:root /media | |
# Expose port 22 for SSH | |
EXPOSE 22 | |
# Start SSH server | |
CMD ["/usr/sbin/sshd", "-D"] |
I'm a sales trainer and would like to use this list for my outbound calls.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Matt, I was online looking for a way to download the INC 5000 list for 2023 and your discussion came up on Google. So, I created an account here to get ahold of you. Would you be willing to sell me the list? I'm not a coder and this all looks like a maze to me!