Skip to content

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

@TheWonderSock

Description

@TheWonderSock

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions