Skip to content

Instantly share code, notes, and snippets.

@MattSandy
Created June 30, 2023 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattSandy/eacde5d49b6b7d829985ebc6b3eb4e4d to your computer and use it in GitHub Desktop.
Save MattSandy/eacde5d49b6b7d829985ebc6b3eb4e4d to your computer and use it in GitHub Desktop.
Another way to get sftp access to docker volume
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"]
@UAG2024
Copy link

UAG2024 commented Feb 14, 2024

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!

@UAG2024
Copy link

UAG2024 commented Feb 14, 2024

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