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

startserver.sh Suggestion: curl may need -L in order to download serverstarter.jar file on some configurations #531

Open
TheWonderSock opened this issue Nov 19, 2022 · 0 comments

Comments

@TheWonderSock
Copy link

TheWonderSock commented Nov 19, 2022

Hi! Just started learning docker today and made a docker image that tries to download afo5 server and start it up with the dockerfile CMD at the end being just CMD ["/bin/bash", "/opt/aof5/startserver.sh"]. Very simple.

My dockerfile is using bash and ubuntu as its base to run this script. Only curl is installed ahead of time. wget is not installed on the system.

When I ran the startserver.sh script, it worked great until it tried to actually run the java file. It said the file was corrupt. I ran file serverstarter.jar and the file was empty.

Upon downloading the serverstarter.jar file manually on my macbook I noticed the URL in the script did not match the URL chrome had actually downloaded the file from. So a redirect was occurring while downloading.

I shoved RUN sed -i 's/curl -o/curl -Lo/g' /opt/aof5/startserver.sh into my dockerfile after this to add the -L option to the script, and it downloaded the file just fine.

Is this an issue with my setup or should your startserver.sh file use the -L option to allow redirects for curl?

I haven't tested the wget part of the script but it might have the same issue and should allow redirects?

@TheWonderSock TheWonderSock changed the title curl may need -L in order to download serverstarter.jar file on some configurations startserver.sh Suggestion: curl may need -L in order to download serverstarter.jar file on some configurations Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant