Skip to content

Commit

Permalink
Merge pull request #86 from seb-elico/7.0.1.0-boot-process
Browse files Browse the repository at this point in the history
[FIX][7.0.1.0] Use dumb-init as init system to handle signals
  • Loading branch information
seb-elico authored Aug 30, 2017
2 parents 947ffea + 2fd5059 commit 0cb2945
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ VOLUME [ \
# Use README for the help & man commands
ADD README.md /usr/share/man/man.txt
# Remove anchors and links to anchors to improve readability
RUN sed -i '/^<a name="/ d' /usr/share/man/man.txt
RUN sed -i '/^<a name=/ d' /usr/share/man/man.txt
RUN sed -i -e 's/\[\^\]\[toc\]//g' /usr/share/man/man.txt
RUN sed -i -e 's/\(\[.*\]\)(#.*)/\1/g' /usr/share/man/man.txt
# For help command, only keep the "Usage" section
Expand All @@ -118,9 +118,12 @@ RUN from=$( awk '/^## Usage/{ print NR; exit }' /usr/share/man/man.txt ) && \
tail -n +$from | \
tee /usr/share/man/help.txt > /dev/null

# Set the default entrypoint (non overridable) to run when starting the container
ADD bin /app/bin/
ENTRYPOINT [ "/app/bin/boot" ]
# Use dumb-init as init system to launch the boot script
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb /opt/sources/dumb-init.deb
RUN dpkg -i /opt/sources/dumb-init.deb
ADD boot /usr/bin/boot
RUN chmod +x /usr/bin/boot
ENTRYPOINT [ "/usr/bin/dumb-init", "/usr/bin/boot" ]
CMD [ "help" ]

# Expose the odoo port (for linked containers)
Expand Down
3 changes: 2 additions & 1 deletion bin/boot
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,5 @@ function start {
}

# Run command
"$*"
$*

0 comments on commit 0cb2945

Please sign in to comment.