-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Docker Fixes #3657
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
base: master
Are you sure you want to change the base?
Docker Fixes #3657
Changes from all commits
0017af6
430e89e
6c34cec
19efb47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -965,35 +965,22 @@ export NVM_DIR="$HOME/.nvm" | |
|
|
||
| ## Docker For Development Environment | ||
|
|
||
| To make the development and testing work easier, we have a Dockerfile for development usage, which is based on Ubuntu 18.04 base image, prepared with essential and useful tools for `nvm` development, to build the docker image of the environment, run the docker command at the root of `nvm` repository: | ||
|
|
||
| ```sh | ||
| $ docker build -t nvm-dev . | ||
| ``` | ||
|
|
||
| This will package your current nvm repository with our pre-defined development environment into a docker image named `nvm-dev`, once it's built with success, validate your image via `docker images`: | ||
|
|
||
| ```sh | ||
| $ docker images | ||
|
|
||
| REPOSITORY TAG IMAGE ID CREATED SIZE | ||
| nvm-dev latest 9ca4c57a97d8 7 days ago 650 MB | ||
| ``` | ||
|
|
||
| If you got no error message, now you can easily involve in: | ||
|
|
||
| To make the development and testing work easier, we have a Dockerfile for development usage. This is an Ubuntu 22.04 base image with some development tools added and a copy of this repo (including the current working copy) copied to `~/.nvm/` in the image. To build and use it, `cd` to the root of this repo and: | ||
| ```sh | ||
| $ docker run -h nvm-dev -it nvm-dev | ||
| docker build -t nvm-dev . # Create the nvm-dev image | ||
| docker images # Confirm nvm-dev appears in the list. | ||
|
|
||
| nvm@nvm-dev:~/.nvm$ | ||
| # Create a container named `nvm-dev` (with the same hostname) | ||
| # and enter an interactive session in it. | ||
| docker run --name nvm-dev -h nvm-dev -it nvm-dev | ||
| ``` | ||
|
|
||
| Please note that it'll take about 8 minutes to build the image and the image size would be about 650MB, so it's not suitable for production usage. | ||
| This will place you in the container in the `~/.nvm/` directory as the `nvm` user. When you exit the container will not be deleted (so as to avoid losing any work in it); you can re-enter the container with `docker start -i nvm-dev` or delete it permanently with `docker container rm -f nvm-dev`. (For more information on using Docker, see the [website][dr-web] and [documentation][dr-docs]. | ||
|
|
||
| For more information and documentation about docker, please refer to its official website: | ||
| Note that the build takes several minutes and well over half a gigabyte of disk space, so it's not suitable for production usage. | ||
|
|
||
| - https://www.docker.com/ | ||
| - https://docs.docker.com/ | ||
| [dr-docs]: https://docs.docker.com/ | ||
| [dr-web]: https://www.docker.com/ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see the reason to reverse the order here; we should keep the diff to a minimum. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I sorted in alphabetical order, as I generally do with my reference definitions. That said, I have no problem swapping the two, but you'll still end up with the same number of lines of diff. |
||
|
|
||
| ## Problems | ||
|
|
||
|
|
||
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.
The mirror looks functional. Please provide broken proof of the "bad mirror".
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.
The proof is in the error messages I gave in the commit message. Did you read those? How did you replicate this to have it working for you? Did you use
docker build --no-cacheto ensure you were actually rebuilding those layers? If that worked for you, I suppose there is a possibility that this is somehow related to geolocation (I'm in Tokyo), though I can't really see how that would be.Nonetheless, setting a proxy that is likely to be worse for most people (I expect that Canonical has far better network connectivity than a mid-level university) in a place where users are unlikely to come across it is a bad idea anyway.
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.
I checked its certificate, and it's correct, but I should test it another way to make sure we are on the same page, yes. Will do it later.
Uh oh!
There was an error while loading. Please reload this page.
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.
You probably already know this, but just in case, remember that you need to try to validate the remote cert using
aptin the container itself. Just because it works in the web browser on your laptop doesn't mean that that cert can be validated using the cert store built into the image. (Which is, after all, more than three years old now.)Just doing a
docker build --no-cache -t temp0 .at the head ofmastershould demonstrate the problem. If it doesn't, that's very mysterious to me. I just checked this again right now and still see the issue.