Skip to content

Commit

Permalink
Merge pull request #26 from AbcSxyZ/main-factoring
Browse files Browse the repository at this point in the history
Create main function in entrypoint + rename entrypoint
  • Loading branch information
patricklodder authored Dec 4, 2021
2 parents 6e9d7b0 + 7a24a2d commit 335f326
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions 1.14.5/bullseye/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ RUN tar -xvf dogecoin.tar.gz --strip-components=1 \
&& chmod 4555 /usr/local/bin/dogecoin* \
&& rm -rf *

COPY docker-entrypoint.py /usr/local/bin/docker-entrypoint
RUN chmod 500 /usr/local/bin/docker-entrypoint
COPY entrypoint.py /usr/local/bin/entrypoint.py
RUN chmod 500 /usr/local/bin/entrypoint.py

WORKDIR ${HOME}

Expand All @@ -97,5 +97,5 @@ EXPOSE 22555 44555 18332

VOLUME ["/dogecoin/.dogecoin"]

ENTRYPOINT ["docker-entrypoint"]
ENTRYPOINT ["entrypoint.py"]
CMD ["dogecoind"]
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def run_executable(executable, executable_args):
#Run container command
execute(executable, executable_args)

if __name__ == "__main__":
def main():
if sys.argv[1].startswith("-"):
executable = "dogecoind"
else:
Expand All @@ -146,3 +146,6 @@ def run_executable(executable, executable_args):
executable_args += sys.argv[1:]

run_executable(executable, executable_args)

if __name__ == "__main__":
main()

0 comments on commit 335f326

Please sign in to comment.