Skip to content

install curl before trying to install docker#345

Open
staticfrost wants to merge 1 commit into
OutlineFoundation:masterfrom
staticfrost:master
Open

install curl before trying to install docker#345
staticfrost wants to merge 1 commit into
OutlineFoundation:masterfrom
staticfrost:master

Conversation

@staticfrost

Copy link
Copy Markdown

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.

@fortuna fortuna left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trevj FYI

}

function install_curl() {
apt update && apt upgrade && apt install curl | sh > /dev/null 2>&1

Copy link
Copy Markdown
Collaborator

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?

}

function install_curl() {
apt update && apt upgrade && apt install curl | sh > /dev/null 2>&1

Copy link
Copy Markdown
Collaborator

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?

Copy link
Copy Markdown
Author

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.

Copy link
Copy Markdown

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.

@trevj

trevj commented Dec 10, 2018

Copy link
Copy Markdown
Contributor

@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 curl and wget - WDYT? That's a straightforward change and I think basically every VM out there comes with one of those two pre-installed.

@staticfrost

Copy link
Copy Markdown
Author

@trevj thanks for the feedback.
So instead of installing curl it should check if it has curl or wget and use which one it detects to then do the docker download?

@trevj

trevj commented Dec 11, 2018

Copy link
Copy Markdown
Contributor

@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 curl or wget for the Docker install based on what's present on the system. I think that would be very useful.

@fortuna fortuna requested a review from trevj December 11, 2018 15:52
@fortuna

fortuna commented Dec 17, 2018

Copy link
Copy Markdown
Collaborator

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.

@trevj

trevj commented Jan 7, 2019

Copy link
Copy Markdown
Contributor

@staticfrost Please let us know if you still have time to work on this!

@staticfrost

Copy link
Copy Markdown
Author

@trevj Sorry for the delay I'll make a new commit this weekend I've thought of a far easy way to achieve this.

@trevj trevj removed their assignment Sep 25, 2019
@staticfrost staticfrost requested a review from a team as a code owner August 2, 2022 21:24
@staticfrost staticfrost requested a review from a team as a code owner January 19, 2024 22:35
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

Successfully merging this pull request may close these issues.

4 participants