Skip to content

Commit c3b192a

Browse files
committed
add gui example
1 parent bc9632d commit c3b192a

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

gui_examples/Dockerfile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM ubuntu:14.04
2+
3+
RUN apt-get update && apt-get install -y firefox
4+
5+
# Replace 1000 with your user / group id
6+
RUN export uid=1000 gid=1000 && \
7+
mkdir -p /home/developer && \
8+
echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \
9+
echo "developer:x:${uid}:" >> /etc/group && \
10+
echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \
11+
chmod 0440 /etc/sudoers.d/developer && \
12+
chown ${uid}:${gid} -R /home/developer
13+
14+
USER developer
15+
ENV HOME /home/developer
16+
CMD /usr/bin/firefox

gui_examples/Readme

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sudo docker build -t firefox .
2+
sudo xhost +
3+
sudo docker run -it --rm -e DISPLAY=$DISPLAY -e XAUTHORITY=$XAUTHORITY -v /tmp/.X11-unix:/tmp/.X11-unix firefox

0 commit comments

Comments
 (0)