Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create main function in entrypoint + rename entrypoint #26

Merged
merged 2 commits into from
Dec 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()