saghul / lxd-alpine-builder

Build Alpine Linux images for LXD
GNU Lesser General Public License v2.1
175 stars 48 forks source link

Fixing #1 by help of @Thura98's comment #5

Closed Anon-Exploiter closed 3 years ago

Anon-Exploiter commented 3 years ago

There's an error while building the script:

Error states:

wc: /home/umar_0x01/alpine/rootfs/usr/share/alpine-mirrors/MIRRORS.txt: No such file or directory
sed: -e expression #1, char 2: invalid usage of line address 0
Selecting mirror /v3.13/main
WARNING: Ignoring /v3.13/main: No such file or directory
ERROR: unable to select packages:
  alpine-base (no such package):
    required by: world[alpine-base]
Failed to install rootfs

image


Fixation: Create the alpine-mirrors directory inside share/ and download MIRRORS.txt file in it.

Automation (with help of https://github.com/saghul/lxd-alpine-builder/issues/1#issuecomment-770207874):

mkdir -p $rootfs/usr/share/alpine-mirrors/
wget http://alpine.mirror.wearetriple.com/MIRRORS.txt -O $rootfs/usr/share/alpine-mirrors/MIRRORS.txt

Building with fixes: image

image

saghul commented 3 years ago

Isn't there a more "official" mirrors list?

Anon-Exploiter commented 3 years ago

Picked up one from the comments lol, pass one and I'll edit the commit on this PR.

nadoneves commented 2 years ago

Solution for me.

Edit build-alpine: comment line 83 wget http://alpine.mirror.wearetriple.com/MIRRORS.txt -O $rootfs/usr/share/alpine-mirrors/MIRRORS.txt to # wget http://alpine.mirror.wearetriple.com/MIRRORS.txt -O $rootfs/usr/share/alpine-mirrors/MIRRORS.txt

edit rootfs/usr/share/alpine-mirrors/MIRRORS.txt remove all lines and add: http://mirror.ps.kz/alpine

execute ./build-alpine