Skip to content

Commit ead512a

Browse files
authored
Merge 8b91029 into 6dfab24
2 parents 6dfab24 + 8b91029 commit ead512a

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
FROM python:3.7-stretch
22
LABEL maintainer "chadestioco@gmail.com"
33

4+
ARG userid=1000
5+
46
RUN apt-get update && \
57
pip install pygame
68

79
COPY ./requirements.txt /requirements.txt
810
RUN pip install -r /requirements.txt
911
COPY ./ app/
1012
RUN cd app/ && python setup.py install
11-
RUN useradd -m -U -s /bin/bash pygame
13+
RUN useradd -m -U -s /bin/bash -u $userid pygame
1214

1315
USER pygame
1416
WORKDIR /home/pygame

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,15 @@ commmon code patterns I find while using PyGame.
1515
as this relies on language features only available from there.
1616

1717
# Development
18-
Aside from `.travis.yml`, the Dockerfile is provided for development. You can
19-
also pull the image via
18+
19+
Aside from `.travis.yml`, the Dockerfile is provided for development. The
20+
Dockerfile takes an argument `userid` which should be a user id outside the
21+
container that has access to `/tmp/.X11-unix`. If you are in a graphical desktop
22+
environment, it would suffice to pass the `$UID` environment variable like so,
23+
24+
docker build -t pygame-objects --build-arg userid=$UID .
25+
26+
You can also pull the image via
2027

2128
docker run skytreader/pygame-objects:latest
2229

components/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""
22
Just my __init__.py to conform to standards.
33
"""
4-
__version__ = "3.0.2-alpha"
4+
5+
__version__ = "3.1.0-alpha"
6+

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from distutils.core import setup
2+
from components import __version__
23

34
import os
45

@@ -12,7 +13,7 @@ def get_font_paths():
1213

1314
setup(
1415
name="PyGame Objects",
15-
version="3.0.2-alpha",
16+
version=__version__,
1617
author="Chad Estioco",
1718
author_email="chadestioco@gmail.com",
1819
url="https://github.com/skytreader/PyGame-Objects",

0 commit comments

Comments
 (0)