diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..64fcd5f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +*.swp +.git/ +.gitignore +.travis.yml +CHANGELOG.md +Dockerfile +LICENSE +README.md +bash-powerline-screenshot.png diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..994a385 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,39 @@ +FROM python:2.7-alpine + +MAINTAINER github.com/banga/powerline-shell + +ENV USER docker +ENV USERNAME "Docker User" + +# Create a 'docker' user because we might not want to run everything as 'root'. Use 9999 as the ID +# to keep it specific and away from the IDs in the host system. +RUN addgroup -g 9999 $USER && \ + adduser -u 9999 -G $USER -g "$USERNAME" -s /bin/bash -D $USER + +RUN apk add --no-cache --update \ + bzr \ + fossil \ + git \ + mercurial \ + php5 \ + subversion && \ + rm -rf /var/cache/apk/* + +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app + +# Cache the dev requirements. +COPY requirements-dev.txt . +RUN pip install -r requirements-dev.txt + +USER docker +RUN bzr whoami "$USERNAME <$USER@example.com>" && \ + git config --global user.email "$USER@example.com" && \ + git config --global user.name "$USERNAME" + +COPY . ./ +USER root +RUN chown -R docker:docker . + +USER docker +RUN nosetests