Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
Added entrypoint script to remove '.config-lock' before run. Resolves…
Browse files Browse the repository at this point in the history
… issue #1
  • Loading branch information
PHLAK committed Dec 9, 2019
1 parent 27dc302 commit 84449dc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ ARG FLEXGET_VERSION=3.0.13
# Create Flexget directories
RUN mkdir -pv /opt/flexget /etc/flexget

# Copy entrypoint script into image
COPY files/entrypoint.sh /opt/flexget/entrypoint.sh

# Create non-root user
RUN adduser -DHs /sbin/nologin flexget

Expand Down Expand Up @@ -34,5 +37,8 @@ VOLUME /etc/flexget
# Set working directory
WORKDIR /opt/flexget

# Default entrypoint
ENTRYPOINT ["/opt/flexget/entrypoint.sh"]

# Default command
CMD ["flexget", "-c", "/etc/flexget/config.yml", "--loglevel", "verbose", "daemon", "start"]
7 changes: 7 additions & 0 deletions files/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env sh
set -o errexit -o pipefail

FLEXGET_LOCK_FILE="/etc/flexget/.config-lock"
[ -f ${FLEXGET_LOCK_FILE} ] && rm -f ${FLEXGET_LOCK_FILE}

exec "$@"

0 comments on commit 84449dc

Please sign in to comment.