File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
1
FROM python:3.7-stretch
2
2
LABEL maintainer
"[email protected] "
3
3
4
+ ARG userid=1000
5
+
4
6
RUN apt-get update && \
5
7
pip install pygame
6
8
7
9
COPY ./requirements.txt /requirements.txt
8
10
RUN pip install -r /requirements.txt
9
11
COPY ./ app/
10
12
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
12
14
13
15
USER pygame
14
16
WORKDIR /home/pygame
Original file line number Diff line number Diff line change @@ -15,8 +15,15 @@ commmon code patterns I find while using PyGame.
15
15
as this relies on language features only available from there.
16
16
17
17
# 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
20
27
21
28
docker run skytreader/pygame-objects:latest
22
29
You can’t perform that action at this time.
0 commit comments