Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linux Dockerfile, automates project build
- Loading branch information
1 parent
463f8ef
commit f0c8e2a
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
venv/ | ||
.git/ | ||
.buildozer/ | ||
.pytest_cache/ | ||
.tox/ | ||
bin/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Docker image for installing dependencies on Linux and running tests. | ||
# Build with: | ||
# docker build --tag=pywallet-linux --file=dockerfiles/Dockerfile-linux . | ||
# Run with: | ||
# docker run pywallet-linux /bin/sh -c 'make test' | ||
# Or using the entry point shortcut: | ||
# docker run pywallet-linux 'make test' | ||
# Or for interactive shell: | ||
# docker run -it --rm pywallet-linux | ||
# TODO: | ||
# - delete archives to keep small the container small | ||
# - setup caching (for apt, and pip) | ||
FROM ubuntu:18.04 | ||
|
||
# configure locale | ||
RUN apt update -qq > /dev/null && apt install --yes --no-install-recommends \ | ||
locales && \ | ||
locale-gen en_US.UTF-8 | ||
ENV LANG="en_US.UTF-8" \ | ||
LANGUAGE="en_US.UTF-8" \ | ||
LC_ALL="en_US.UTF-8" | ||
|
||
# install system dependencies | ||
RUN apt update -qq > /dev/null && apt install --yes --no-install-recommends \ | ||
make lsb-release sudo | ||
|
||
# install kivy system dependencies | ||
# https://kivy.org/docs/installation/installation-linux.html#dependencies-with-sdl2 | ||
RUN apt install --yes --no-install-recommends \ | ||
libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
RUN make | ||
ENTRYPOINT ["./dockerfiles/start.sh"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# if a some command has been passed to container, executes it and exit, | ||
# otherwise runs bash | ||
if [[ $@ ]]; then | ||
eval $@ | ||
else | ||
/bin/bash | ||
fi |