Skip to content

Commit

Permalink
PID1 fix for orphaned wine processes (wineserver et al.) (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiaswking authored Jan 12, 2018
1 parent 927d292 commit 15a64e2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
6 changes: 4 additions & 2 deletions server/docker-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM ubuntu:16.04

# To solve the PID1 zombie process issue
# http://phusion.github.io/baseimage-docker/
# It derives from ubuntu:16.04
FROM phusion/baseimage:0.9.22

# Base stuff
RUN \
Expand Down
11 changes: 9 additions & 2 deletions server/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ FROM extender-base
ADD extender-0.1.0.jar app.jar
RUN chown extender: app.jar

USER extender
# Create a daemon script for the extender (Execute the internal command as the extender user)
RUN mkdir -p /etc/service/extender && \
echo "#!/bin/sh" > /etc/service/extender/run && \
echo "exec /sbin/setuser extender java -Xmx500m -jar /app.jar" >> /etc/service/extender/run && \
chmod +x /etc/service/extender/run && \
chown extender: /etc/service/extender/run

# Needs to run as root
CMD ["/sbin/my_init"]

ENTRYPOINT ["java","-Xmx500m","-jar","/app.jar"]
EXPOSE 9000

0 comments on commit 15a64e2

Please sign in to comment.