Skip to content

Instantly share code, notes, and snippets.

@rwalk
Last active August 29, 2015 14:23
Show Gist options
  • Save rwalk/0455e2de4d2c13504d04 to your computer and use it in GitHub Desktop.
Save rwalk/0455e2de4d2c13504d04 to your computer and use it in GitHub Desktop.
Autocompleter running in Docker
#
# Docker demo: container for a simple autocomplete program
# Autocomplete script is python3 and consumes a dictionary
# file packaged in the ubuntu operating system.
#
# start with the base ubuntu image
FROM ubuntu
# Tell apt-get that we are going to be NONINTERACTIVE
ENV DEBIAN_FRONTEND noninteractive
# get the dictionary file dependences
RUN apt-get update -y & apt-get install wamerican-insane -y
# point to the src files
ADD /localfiles /files
# set a working directory
WORKDIR /files
# run the autocompleter when the container is launched
ENV PYTHONIOENCODING utf-8
CMD python3 ./autocomplete.py /usr/share/dict/american-english-insane
@rwalk
Copy link
Author

rwalk commented Jun 29, 2015

This Dockerfile will build and run autocomplete.py in a Ubuntu image with the required dictionary files. Change localfiles to point to the directory containing autocomplete.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment