Skip to content

Commit

Permalink
Merge pull request #88 from seb-elico/9.0.1.0-boot-process
Browse files Browse the repository at this point in the history
[MRG][9.0.1.0] Port #86
  • Loading branch information
seb-elico authored Aug 30, 2017
2 parents 531a1c4 + aec57a4 commit 0f5328c
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 @@ -116,7 +116,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 @@ -127,9 +127,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 ports (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 0f5328c

Please sign in to comment.