Last active
August 29, 2015 14:23
-
-
Save rwalk/0455e2de4d2c13504d04 to your computer and use it in GitHub Desktop.
Autocompleter running in Docker
This file contains 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
# | |
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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