IBM-Cloud / ibmcloud-image-builder

ibmcloud-image-builder
Apache License 2.0
10 stars 8 forks source link

GITHUB PACKAGES ISSUE: Cannot pull from github packages container registry #27

Closed syyang-in-cloud closed 4 years ago

syyang-in-cloud commented 4 years ago

What's the issue?

It's weird... we are building a public package... why there is a limit: https://docs.github.com/en/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-packages GitHub Packages usage is free for public packages.


Seungs-MacBook-Pro:ibmcloud-image-builder seungyeop$ docker pull docker.pkg.github.com/ibm-cloud/ibmcloud-image-builder/ibmcloud-image-builder:latest
latest: Pulling from ibm-cloud/ibmcloud-image-builder/ibmcloud-image-builder
a4a2a29f9ba4: Pulling fs layer 
127c9761dcba: Pulling fs layer 
d13bf203e905: Pulling fs layer 
4039240d2e0b: Waiting 
f8d6cfcae13c: Waiting 
3c41be72be83: Waiting 
8823953631d1: Waiting 
5686eb9cd042: Waiting 
d7533e719201: Waiting 
2a5e5a145865: Waiting 
daa073409498: Waiting 
d92e35e8cfc9: Waiting 
7c64da4c22df: Waiting 
179afb3f1663: Waiting 
error pulling image configuration: denied: Encountered a billing-related error. Please verify the billing status for this account.
Seungs-MacBook-Pro:ibmcloud-image-builder seungyeop$```

## Definition of Done

  - Trim the Dockerfile or Use IBM container registry
syyang-in-cloud commented 4 years ago

Hmm... still 667 MB after switching to Alpine ...

Seungs-MacBook-Pro:ibmcloud-image-builder seungyeop$ make build
docker build --squash . -f Dockerfile -t ibmcloud-image-builder:latest
Sending build context to Docker daemon  380.4kB
Step 1/3 : FROM alpine:latest
 ---> a24bb4013296
Step 2/3 : RUN set -ex         && echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories         && apk update         && apk add --no-cache --virtual .build-python         && apk add bash ansible libffi-dev openssl-dev openssh qemu qemu-system-x86_64 qemu-img cloud-init cloud-utils         && wget https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip         && unzip packer_1.6.0_linux_amd64.zip         && chmod +x packer         && rm packer_1.6.0_linux_amd64.zip         && mv packer /usr/local/bin
 ---> Running in dfd7eb6656d9
+ echo http://dl-cdn.alpinelinux.org/alpine/edge/testing
+ apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
v3.12.0-111-g39468dab9c [http://dl-cdn.alpinelinux.org/alpine/v3.12/main]
v3.12.0-119-g8128964f8d [http://dl-cdn.alpinelinux.org/alpine/v3.12/community]
v20200626-296-g5ca2ada43d [http://dl-cdn.alpinelinux.org/alpine/edge/testing]
OK: 16798 distinct packages available
+ apk add --no-cache --virtual .build-python
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
(1/1) Installing .build-python (20200703.112817)
OK: 6 MiB in 15 packages
+ apk add bash ansible libffi-dev openssl-dev openssh qemu qemu-system-x86_64 qemu-img cloud-init cloud-utils
(1/169) Installing libbz2 (1.0.8-r1)
(2/169) Installing expat (2.2.9-r1)
(3/169) Installing libffi (3.3-r2)
(4/169) Installing gdbm (1.13-r1)
(5/169) Installing xz-libs (5.2.5-r0)
(6/169) Installing ncurses-terminfo-base (6.2_p20200523-r0)
(7/169) Installing ncurses-libs (6.2_p20200523-r0)
(8/169) Installing readline (8.0.4-r0)
(9/169) Installing sqlite-libs (3.32.1-r0)
(10/169) Installing python3 (3.8.3-r0)
(11/169) Installing yaml (0.2.4-r1)
(12/169) Installing py3-yaml (5.3.1-r0)
(13/169) Installing py3-asn1 (0.4.7-r2)
(14/169) Installing py3-cparser (2.20-r0)
(15/169) Installing py3-cffi (1.14.0-r2)
(16/169) Installing py3-idna (2.9-r0)
(17/169) Installing py3-asn1crypto (1.3.0-r0)
(18/169) Installing py3-six (1.15.0-r0)
(19/169) Installing py3-cryptography (2.9.2-r0)
(20/169) Installing py3-bcrypt (3.1.7-r2)
(21/169) Installing py3-pynacl (1.4.0-r0)
(22/169) Installing py3-paramiko (2.7.1-r0)
(23/169) Installing py3-markupsafe (1.1.1-r3)
(24/169) Installing py3-jinja2 (2.11.2-r0)
(25/169) Installing py3-pycryptodome (3.9.7-r0)
(26/169) Installing ansible (2.9.9-r0)
(27/169) Installing bash (5.0.17-r0)
Executing bash-5.0.17-r0.post-install
(28/169) Installing libblkid (2.35.2-r0)
(29/169) Installing blkid (2.35.2-r0)
(30/169) Installing libcom_err (1.45.6-r0)
(31/169) Installing e2fsprogs-libs (1.45.6-r0)
(32/169) Installing libuuid (2.35.2-r0)
(33/169) Installing e2fsprogs (1.45.6-r0)
(34/169) Installing e2fsprogs-extra (1.45.6-r0)
(35/169) Installing ifupdown (0.8.35-r0)
(36/169) Installing py3-configobj (5.0.6-r7)
(37/169) Installing py3-jsonpointer (2.0-r3)
(38/169) Installing py3-jsonpatch (1.26-r0)
(39/169) Installing py3-pyrsistent (0.16.0-r0)
(40/169) Installing py3-attrs (19.3.0-r1)
(41/169) Installing py3-ordered-set (4.0.1-r0)
(42/169) Installing py3-appdirs (1.4.4-r1)
(43/169) Installing py3-parsing (2.4.7-r0)
(44/169) Installing py3-packaging (20.4-r0)
(45/169) Installing py3-setuptools (47.0.0-r0)
(46/169) Installing py3-more-itertools (8.3.0-r0)
(47/169) Installing py3-zipp (1.0.0-r0)
(48/169) Installing py3-importlib-metadata (1.6.0-r0)
(49/169) Installing py3-jsonschema (3.2.0-r0)
(50/169) Installing py3-oauthlib (2.1.0-r3)
(51/169) Installing py3-chardet (3.0.4-r4)
(52/169) Installing py3-certifi (2020.4.5.1-r0)
(53/169) Installing py3-urllib3 (1.25.9-r0)
(54/169) Installing py3-requests (2.23.0-r0)
(55/169) Installing py3-serial (3.4-r3)
(56/169) Installing linux-pam (1.3.1-r4)
(57/169) Installing shadow (4.8.1-r0)
(58/169) Installing sudo (1.9.0-r0)
(59/169) Installing cloud-init (20.2-r0)
(60/169) Installing libfdisk (2.35.2-r0)
(61/169) Installing libsmartcols (2.35.2-r0)
(62/169) Installing sfdisk (2.35.2-r0)
(63/169) Installing libgcc (9.3.0-r2)
(64/169) Installing popt (1.16-r7)
(65/169) Installing libstdc++ (9.3.0-r2)
(66/169) Installing sgdisk (1.0.5-r0)
(67/169) Installing libcap-ng (0.7.10-r0)
(68/169) Installing setpriv (2.35.2-r0)
(69/169) Installing libmount (2.35.2-r0)
(70/169) Installing findmnt (2.35.2-r0)
(71/169) Installing mcookie (2.35.2-r0)
(72/169) Installing hexdump (2.35.2-r0)
(73/169) Installing lsblk (2.35.2-r0)
(74/169) Installing cfdisk (2.35.2-r0)
(75/169) Installing util-linux (2.35.2-r0)
(76/169) Installing libaio (0.3.112-r1)
(77/169) Installing libintl (0.20.2-r0)
(78/169) Installing pcre (8.44-r0)
(79/169) Installing glib (2.64.3-r0)
(80/169) Installing gmp (6.2.0-r0)
(81/169) Installing nettle (3.5.1-r1)
(82/169) Installing p11-kit (0.23.20-r5)
(83/169) Installing libtasn1 (4.16.0-r1)
(84/169) Installing libunistring (0.9.10-r0)
(85/169) Installing gnutls (3.6.14-r0)
(86/169) Installing qemu-img (5.0.0-r1)
(87/169) Installing mtools (4.0.24-r0)
(88/169) Installing libmagic (5.38-r0)
(89/169) Installing file (5.38-r0)
(90/169) Installing bzip2 (1.0.8-r1)
(91/169) Installing libcap (2.27-r0)
(92/169) Installing cdrkit (1.1.11-r2)
(93/169) Installing libacl (2.2.53-r0)
(94/169) Installing libattr (2.4.48-r0)
(95/169) Installing coreutils (8.32-r0)
(96/169) Installing cloud-utils (0.31-r0)
(97/169) Installing linux-headers (5.4.5-r1)
(98/169) Installing pkgconf (1.7.2-r0)
(99/169) Installing libffi-dev (3.3-r2)
(100/169) Installing openssh-keygen (8.3_p1-r0)
(101/169) Installing libedit (20191231.3.1-r0)
(102/169) Installing openssh-client (8.3_p1-r0)
(103/169) Installing openssh-sftp-server (8.3_p1-r0)
(104/169) Installing openssh-server-common (8.3_p1-r0)
(105/169) Installing openssh-server (8.3_p1-r0)
(106/169) Installing openssh (8.3_p1-r0)
(107/169) Installing openssl-dev (1.1.1g-r0)
(108/169) Installing ca-certificates (20191127-r4)
(109/169) Installing nghttp2-libs (1.41.0-r0)
(110/169) Installing libcurl (7.69.1-r0)
(111/169) Installing mesa (20.0.7-r0)
(112/169) Installing libpciaccess (0.16-r0)
(113/169) Installing libdrm (2.4.102-r0)
(114/169) Installing wayland-libs-server (1.18.0-r4)
(115/169) Installing mesa-gbm (20.0.7-r0)
(116/169) Installing pixman (0.40.0-r2)
(117/169) Installing libseccomp (2.4.3-r0)
(118/169) Installing libxau (1.0.9-r0)
(119/169) Installing libbsd (0.10.0-r0)
(120/169) Installing libxdmcp (1.1.3-r0)
(121/169) Installing libxcb (1.14-r1)
(122/169) Installing libx11 (1.6.9-r0)
(123/169) Installing libepoxy (1.5.4-r0)
(124/169) Installing virglrenderer (0.8.2-r1)
(125/169) Installing libxkbcommon (0.10.0-r1)
(126/169) Installing qemu (5.0.0-r1)
Executing qemu-5.0.0-r1.pre-install
Executing qemu-5.0.0-r1.post-install
*
* If you want to run VM as unprivileged user and let Qemu create tunX devices,
* then you must add that user to the group "qemu".
* If you use KVM for hardware-assisted virtualization, then you may also need
* to add that user to the group "kvm".
*
(127/169) Installing libjpeg-turbo (2.0.5-r0)
(128/169) Installing lzo (2.10-r2)
(129/169) Installing libpng (1.6.37-r1)
(130/169) Installing snappy (1.1.8-r2)
(131/169) Installing mesa-glapi (20.0.7-r0)
(132/169) Installing wayland-libs-client (1.18.0-r4)
(133/169) Installing libxshmfence (1.3-r0)
(134/169) Installing mesa-egl (20.0.7-r0)
(135/169) Installing libxdamage (1.1.5-r0)
(136/169) Installing libxext (1.3.4-r0)
(137/169) Installing libxfixes (5.0.3-r2)
(138/169) Installing libxxf86vm (1.1.4-r2)
(139/169) Installing mesa-gl (20.0.7-r0)
(140/169) Installing libxv (1.0.11-r2)
(141/169) Installing alsa-lib (1.2.2-r0)
(142/169) Installing libxrender (0.9.10-r3)
(143/169) Installing brotli-libs (1.0.7-r5)
(144/169) Installing freetype (2.10.2-r0)
(145/169) Installing fontconfig (2.13.1-r2)
(146/169) Installing cairo (1.16.0-r2)
(147/169) Installing cdparanoia-libs (10.2-r8)
(148/169) Installing gstreamer (1.16.2-r2)
(149/169) Installing libogg (1.3.4-r0)
(150/169) Installing opus (1.3.1-r0)
(151/169) Installing orc (0.4.31-r2)
(152/169) Installing libxft (2.3.3-r0)
(153/169) Installing fribidi (1.0.9-r0)
(154/169) Installing graphite2 (1.3.14-r0)
(155/169) Installing harfbuzz (2.6.6-r0)
(156/169) Installing pango (1.44.7-r2)
(157/169) Installing libtheora (1.1.1-r14)
(158/169) Installing libvorbis (1.3.6-r2)
(159/169) Installing wayland-libs-egl (1.18.0-r4)
(160/169) Installing gst-plugins-base (1.16.2-r3)
(161/169) Installing lz4-libs (1.9.2-r0)
(162/169) Installing db (5.3.28-r1)
(163/169) Installing libsasl (2.1.27-r6)
(164/169) Installing spice-server (0.14.3-r0)
(165/169) Installing libusb (1.0.23-r0)
(166/169) Installing usbredir (0.8.0-r1)
(167/169) Installing openssl (1.1.1g-r0)
(168/169) Installing vde2-libs (2.3.2-r12)
(169/169) Installing qemu-system-x86_64 (5.0.0-r1)
Executing busybox-1.31.1-r16.trigger
Executing ca-certificates-20191127-r4.trigger
OK: 562 MiB in 184 packages
+ wget https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip
Connecting to releases.hashicorp.com (151.101.49.183:443)
saving to 'packer_1.6.0_linux_amd64.zip'
packer_1.6.0_linux_a   8% |**                              | 2528k  0:00:10 ETA
packer_1.6.0_linux_a  54% |*****************               | 15.3M  0:00:01 ETA
packer_1.6.0_linux_a 100% |********************************| 28.2M  0:00:00 ETA
'packer_1.6.0_linux_amd64.zip' saved
+ unzip packer_1.6.0_linux_amd64.zip
Archive:  packer_1.6.0_linux_amd64.zip
  inflating: packer
+ chmod +x packer
+ rm packer_1.6.0_linux_amd64.zip
+ mv packer /usr/local/bin
Removing intermediate container dfd7eb6656d9
 ---> 4515b5e7d5c0
Step 3/3 : WORKDIR /ibmcloud-image-builder
 ---> Running in e89ac01aaa1e
Removing intermediate container e89ac01aaa1e
 ---> 6bca2542d8eb
Successfully built 3800357f444c
Successfully tagged ibmcloud-image-builder:latest
Seungs-MacBook-Pro:ibmcloud-image-builder seungyeop$ docker images | grep ibm
ibmcloud-image-builder                       latest              3800357f444c        12 seconds ago      667MB
syyang-in-cloud commented 4 years ago

Even 497 MB, you got to be kidding me:

Seungs-MacBook-Pro:ibmcloud-image-builder seungyeop$ docker pull docker.pkg.github.com/ibm-cloud/ibmcloud-image-builder/ibmcloud-image-builder:macbuild
macbuild: Pulling from ibm-cloud/ibmcloud-image-builder/ibmcloud-image-builder
df20fa9351a1: Already exists 
62aecf0266e5: Already exists 
error pulling image configuration: denied: Encountered a billing-related error. Please verify the billing status for this account.
syyang-in-cloud commented 4 years ago

It seems that it's not a bug from my side; I asked github support.

syyang-in-cloud commented 4 years ago

Hmm... it seems that it's not available from github packages yet. : https://github.community/t/use-docker-images-from-github-package-registry/16135/5

syyang-in-cloud commented 4 years ago

Instead of github package, I've pushed the docker image to docker hub. This issue is not a blocking the release any more, and I'll close this. Go visit, and docker pull from here: https://hub.docker.com/r/syibm/ibmcloud-image-builder/tags