mirror of
https://github.com/b-ryan/powerline-shell.git
synced 2026-09-09 23:16:23 -04:00
Dockerize tests for easy reproduction.
This commit is contained in:
parent
365a6d9a02
commit
19a913c108
9
.dockerignore
Normal file
9
.dockerignore
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
*.swp
|
||||
.git/
|
||||
.gitignore
|
||||
.travis.yml
|
||||
CHANGELOG.md
|
||||
Dockerfile
|
||||
LICENSE
|
||||
README.md
|
||||
bash-powerline-screenshot.png
|
||||
39
Dockerfile
Normal file
39
Dockerfile
Normal file
|
|
@ -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
|
||||
Loading…
Reference in a new issue