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

Please provide different download link for different version #1053

Closed
twang2218 opened this issue Dec 19, 2016 · 8 comments
Closed

Please provide different download link for different version #1053

twang2218 opened this issue Dec 19, 2016 · 8 comments

Comments

@twang2218
Copy link

Currently, the only download link for Docker for Mac is https://download.docker.com/mac/stable/Docker.dmg, which is handy if we just want to download the latest version of the file to install.

However, if we have some problem when automatic this a little bit. The same link but different version of binary alway confuse the download script. Thing get even worse if we apply the checksum for the validation, which always raise warning, if the link silently replaced the file with another one.

Could you provide a permanent link for each version of the binary? Such as,

And to keep the backward compatibility, we can ln the stable to the latest stable version.

So we can manually update the link and checksum in the download script, and make sure everyone are on the same page.

@twang2218
Copy link
Author

Things get even worse, as without download and install the file, we have no idea which version of the binary it is. Currently docker version is 1.12.5, however, the Docker for Mac stable version is1.12.3.

@djs55
Copy link
Contributor

djs55 commented Dec 19, 2016

Thanks for the request. I'll speak to the people responsible for the download URLs and get back to you.

@friism
Copy link

friism commented Dec 19, 2016

@twang2218 what's the download script that you're maintaining to fetch Docker for Mac installers?

Note that app autoupdates after install (by default), so I'd love to learn more about why you're interested in installing an old version of Docker for Mac.

@twang2218
Copy link
Author

@friism Here is the script I used to create a local copy of Docker software: https://coding.net/u/twang2218/p/docker-downloader/git/blob/master/run.sh

It's always GFW problem, because of it, we often have trouble download software directly from GitHub and AWS, especially those HTTPS links. Sometimes it interferes with the response, sometimes it contaminates the DNS, or sends fake finished signal, or drop the packets, etc.

That's the reason most autoupdate features often fail in China, including the Docker for Mac's autoupdate feature. It's not only Docker for Mac's problem, such as, docker-machine will fail to download latest boot2docker.iso, as well, and Atom will not update or hardly success.

To overcome the problem, I created a script to download those Docker software from official website manually, and verify it by the checksum predefined in the script. So, any integrity issuse happened in the between, it can detect it, so we can decide to try it again, or download from another channel.

Becasue of the issue, I try to maintain the version and checksum of those links. And provide a local copy for the Docker software as well, and also let others to use the script to create their own local copy of the Docker softwares.

And the script will raise false alarm if the same link has been replaced with another version. As the problem we have here, most time we think it's the GFW again, so we just try it again and again or find another channel to try it. Some even report to me that the package I provided has been modified as it's not as same as the one they downloaded themselves from the same link. It may take some times to realise that's just a new version, not integrity issue at all.

And without download and install it, we have no idea what exactly the version is. So, after the script download it, it's hard to assign a correct version name to it. Without the version in the name, others who check on the local copy pages for update will not realize there is a new version, not the old one they downloaded already.

Previously, I manually download and extract the .dmg file and check the version number, and manually changed the filename to reflect the version of it. But because it's the same link, I did waste a lot of time to check the version of same package again and again. And currently, I wrote a script to use some trickies to help me understand of the package version, but it is a little bit hacky.

That's the story, I do want to keep the latest version of Docker software, but have the version in the link, or even better, to use GitHub release feature in this repo, will help me to keep update the script and my local copy to the latest version. And also help others who use the copy have better understanding of the integrity status of the local copy.

@friism
Copy link

friism commented Dec 20, 2016

@twang2218 alright, thanks for that extra detail.

One thing that you could do is use the appcast urls. While not exactly "public", they are stable. It's how we publish auto-updates: https://download.docker.com/mac/stable/appcast.xml

That has link to current version. At the time of writing, it's https://download.docker.com/mac/stable/1.12.3.13776/Docker.dmg. That url is forever. It also has a checksum: https://download.docker.com/mac/stable/1.12.3.13776/Docker.dmg.sha256sum

Does that work?

@twang2218
Copy link
Author

@friism Great! That's exactly what I need. I think it solved my issue, I will look into it. Thank you very much! 😸

@twang2218
Copy link
Author

Verified, it works perfectly. Thanks a lot.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants