Skip to content

Instantly share code, notes, and snippets.

@filp
Last active March 5, 2018 14:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save filp/f065c92162527e74135107a450f6a681 to your computer and use it in GitHub Desktop.
Save filp/f065c92162527e74135107a450f6a681 to your computer and use it in GitHub Desktop.

Systems Engineer Project

SFTP watcher

Using Docker, and other tools of your choice, your task is to build a simple SFTP server & notification system, by combining two containers:

  • Container A runs the SFTP server
  • Container B runs a script or service that monitors the directory served by Container A for new files, and prints their path to STDOUT

Rules

  • Both services (SFTP and the watcher) need to live in separate containers
  • You are free to use an existing Docker image for the SFTP server as your starting point (e.g https://github.com/atmoz/sftp)
  • You are free to setup the Docker container for the watcher service however you'd like, but you must build it yourself:
    • Pick any language you're comfortable with (Bash is fine too)
    • You are free to use a base Docker image for the language you're using as the starting point (e.g https://hub.docker.com/_/ruby/ if you were to use ruby)
  • Use Docker volumes to share a directory between the SFTP and watcher containers
  • The watcher service should print the full path of new files in the directory (from the time the service starts)
  • The project should be able to be started from a single command
    • You may write your own starter script, use docker-compose, or other tools of your choosing
  • The SFTP service should accept the following credentials to connect:
    • username: impraise
    • password: impraise
  • Remember to document your Dockerfile(s) and other components of your project appropriately!
  • We expect the submitted code to be production ready wherever feasible.
    IMPORTANT any areas where your project falls short of production readiness, please submit a short note explaining the steps you'd take to make it so.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment