-
Notifications
You must be signed in to change notification settings - Fork 787
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
install curl before trying to install docker #345
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trevj FYI
@@ -118,6 +136,9 @@ function verify_docker_running() { | |||
fi | |||
} | |||
|
|||
function install_curl() { | |||
apt update && apt upgrade && apt install curl | sh > /dev/null 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to pipe to sh
?
@@ -118,6 +136,9 @@ function verify_docker_running() { | |||
fi | |||
} | |||
|
|||
function install_curl() { | |||
apt update && apt upgrade && apt install curl | sh > /dev/null 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need apt upgrade
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it is because it will install an outdated version of curl otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apt update
gets the version info. apt upgrade
will attempt to upgrade all of the installed packages. Definitely not needed to get the latest version of curl.
@staticfrost Thanks for contributing to Outline! So, a problem is that this script is meant to run on a wide variety of platforms. Detecting the system type and providing instructions for each is a place I'd rather not go: for one thing, we strive to make as few changes to the system as possible (the obvious exception is the Docker install script but that's designed to run on a wide variety of systems). @fortuna I'd rather solve this by providing instructions in the manager for both |
@trevj thanks for the feedback. |
@staticfrost Actually I was just thinking of the server manager's "advanced setup" but that's a good idea, you're right: the script could suggest |
As a minimal change, we should support at least wget, since the advanced install instructions already use it, so we could assume the user will have wget installed. |
@staticfrost Please let us know if you still have time to work on this! |
@trevj Sorry for the delay I'll make a new commit this weekend I've thought of a far easy way to achieve this. |
Instances where curl is required to install docker but curl isn't installed first.
This checks for the curl command if it isn't found it will install curl from apt.