Merge "Allow use of mirrors when building Ubuntu images"
This commit is contained in:
commit
1831a2bfbd
@ -6,3 +6,5 @@ Overrides:
|
||||
use the environment variable DIB\_CLOUD\_IMAGES
|
||||
* To download a non-default release of Ubuntu cloud images, use the
|
||||
environment variable DIB\_RELEASE
|
||||
* To use a different mirror rather than archive.ubuntu.com, use the
|
||||
environment variable DIB\_DISTRIBUTION\_MIRROR
|
||||
|
10
elements/ubuntu/pre-install.d/01-set-ubuntu-mirror
Executable file
10
elements/ubuntu/pre-install.d/01-set-ubuntu-mirror
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-}
|
||||
|
||||
[ -n "$DIB_DISTRIBUTION_MIRROR" ] || exit 0
|
||||
|
||||
sudo sed -ie "s&http://archive.ubuntu.com/ubuntu&$DIB_DISTRIBUTION_MIRROR&" \
|
||||
/etc/apt/sources.list
|
Loading…
Reference in New Issue
Block a user