{"id":13808887,"url":"https://github.com/scaleway/image-builder","last_synced_at":"2025-12-30T01:05:55.563Z","repository":{"id":71101933,"uuid":"54121263","full_name":"scaleway/image-builder","owner":"scaleway","description":":triangular_ruler: build server images on Scaleway","archived":false,"fork":false,"pushed_at":"2023-07-26T08:50:42.000Z","size":65,"stargazers_count":66,"open_issues_count":5,"forks_count":9,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-08-04T01:10:07.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scaleway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-03-17T13:47:00.000Z","updated_at":"2023-07-26T08:50:47.000Z","dependencies_parsed_at":"2024-01-28T23:43:22.407Z","dependency_job_id":null,"html_url":"https://github.com/scaleway/image-builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fimage-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fimage-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fimage-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fimage-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scaleway","download_url":"https://codeload.github.com/scaleway/image-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225273287,"owners_count":17448080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T01:01:54.283Z","updated_at":"2025-12-30T01:05:55.531Z","avatar_url":"https://github.com/scaleway.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile"],"sub_categories":[],"readme":"# Build your server images on Scaleway\n\n[![Build Status](https://travis-ci.org/scaleway/image-builder.svg?branch=master)](https://travis-ci.org/scaleway/image-builder)\n[![Scaleway ImageHub](https://img.shields.io/badge/ImageHub-view-ff69b4.svg)](https://www.scaleway.com/imagehub/image-builder/)\n[![Run on Scaleway](https://img.shields.io/badge/Scaleway-run-69b4ff.svg)](http://cloud.scaleway.com/#/servers/new?image=67597b1e-89f7-4fb3-98e2-6e199ca60adb)\n\nScripts to build the official Image Builder on Scaleway\n\n![](http://s10.postimg.org/fw962sxkp/builder.png)\n---\n\n**This image is meant to be used on a Scaleway server.**\n\nWe use the Docker's building system and convert it at the end to a disk image that will boot on real servers without Docker.\n\n\u003e Note that the image is still runnable as a Docker container for debug or for inheritance.\n\n[More info](https://github.com/scaleway/image-tools)\n\n\n## How to build a custom image using [scw](https://github.com/scaleway/scaleway-cli)\n\n**My custom image's description**\n- based on the official [Ubuntu Wily](https://github.com/scaleway/image-ubuntu)\n- with `cowsay` pre-installed\n\n---\n\n##### 1. Making the environment\n\n```console\nroot@yourmachine\u003e scw run --name=\"buildcowsay\" image-builder\n               _\n ___  ___ __ _| | _____      ____ _ _   _\n/ __|/ __/ _` | |/ _ \\ \\ /\\ / / _` | | | |\n\\__ \\ (_| (_| | |  __/\\ V  V / (_| | |_| |\n|___/\\___\\__,_|_|\\___| \\_/\\_/ \\__,_|\\__, |\n                                    |___/\n...\n\n*****************************************************************************\n\n   Welcome on the image-builder.\n   Here, you'll be able to craft your own images.\n\n   To configure your environment run:\n\n   $\u003e image-builder-configure\n\n*****************************************************************************\n\n...\n\nroot@buildcowsay:~# image-builder-configure\nLogin (cloud.scaleway.com):                     # yourmail\nPassword:                                       # yourpassword\nroot@buildcowsay:~# mkdir cowsay\nroot@buildcowsay:~# cp Makefile.sample cowsay/Makefile\nroot@buildcowsay:~# cp Dockerfile.sample cowsay/Dockerfile\nroot@buildcowsay:~# cd cowsay\nroot@buildcowsay:~/cowsay# ls -l\ntotal 4\n-rw-r--r-- 1 root root  562 Mar 18 10:37 Dockerfile\n-rw-r--r-- 1 root root  556 Mar 18 10:38 Makefile\n```\n##### 2. Configuring your Makefile\n```console\nNAME =                  cowsay\nVERSION =               latest\nVERSION_ALIASES =       1.2.3 1.2 1\nTITLE =                 wily-cowsay\nDESCRIPTION =           wily with cowsay pre-installed\nDOC_URL =\nSOURCE_URL =            https://github.com/scaleway-community/...\nVENDOR_URL =\nDEFAULT_IMAGE_ARCH =\tx86_64\n\n\nIMAGE_VOLUME_SIZE =     50G\nIMAGE_BOOTSCRIPT =      stable\nIMAGE_NAME =            cowsay\n\n## Image tools  (https://github.com/scaleway/image-tools)\nall:\tdocker-rules.mk\ndocker-rules.mk:\n\twget -qO - https://j.mp/scw-builder | bash\n-include docker-rules.mk\n```\n\n\n##### 3. Configuring your Dockerfile\n\n\u003e Note: Don't remove the comments #FROM scaleway/distribution:arch-version # arch=arch\n\n\u003e These lines are used by Makefile to handle the multiarch\n\n```dockerfile\nFROM scaleway/ubuntu:amd64-wily\n# following 'FROM' lines are used dynamically thanks do the image-builder\n# which dynamically update the Dockerfile if needed.\n#FROM scaleway/ubuntu:armhf-wily       # arch=armv7l\n#FROM scaleway/ubuntu:arm64-wily       # arch=arm64\n#FROM scaleway/ubuntu:i386-wily        # arch=i386\n#FROM scaleway/ubuntu:mips-wily        # arch=mips\n\n# Prepare rootfs\nRUN /usr/local/sbin/scw-builder-enter\n\n# install cowsay\nRUN apt-get install -y cowsay\n\n# Clean rootfs\nRUN /usr/local/sbin/scw-builder-leave\n```\n\nYou can see other Dockerfiles [here](https://github.com/scaleway/image-tools#official-images-built-with-image-tools)\n\n##### 4. Building the custom image\n```console\nroot@buildcowsay\u003e make image_on_local\n...\n[+] URL of the tarball: http://YOUR_IP:8000/x86_64-cowsay-latest/x86_64-cowsay-latest.tar\n[+] Target name: x86_64-cowsay-latest.tar\n[+] Creating new server in rescue mode with a secondary volume...\n[+] Server created: 3e801785-4e62-425f-bb5a-04eac555ff79\n[+] Booting...\nLinux vm-10-2-12-155 4.4.4-std-3 #1 SMP Tue Mar 8 17:31:34 UTC 2016 x86_64 GNU/Linux\n[+] Server is booted\n[+] Formating and mounting disk...\nmke2fs 1.42.12 (29-Aug-2014)\next2fs_check_if_mount: Can't check if filesystem is mounted due to missing mtab file while determining whether /dev/vda is mounted.\nCreating filesystem with 12207031 4k blocks and 3055616 inodes\nFilesystem UUID: 0201e6cd-4848-4118-b762-297968e776af\nSuperblock backups stored on blocks:\n\t32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,\n\t4096000, 7962624, 11239424\n\nAllocating group tables: done\nWriting inode tables: done\nCreating journal (32768 blocks): done\nWriting superblocks and filesystem accounting information: done\n\n[+] /dev/nbd1 formatted in ext4 and mounted on /mnt\n[+] Download tarball and write it to /mnt\n[+] Tarball extracted on disk\n[+] Stopping the server\n[+] Server stopped\n[+] Creating a snapshot of disk 1\n[+] Snapshot ae6f1ed9-6b77-46f9-861a-2b4d66cb38b5 created\n[+] Creating an image based of the snapshot\n[+] Image created: 53962798-2933-4cc9-b6c9-1e05f6ff7051   # IMAGE_ID\n[+] Deleting temporary server\n[+] Server deleted\n```\nYour custom image is now available [here](https://cloud.scaleway.com/#/images)\n\n##### 4. Running your custom image\n```console\nroot@buildcowsay:~/cowsay# scw run --tmp-ssh-key --name=\"cowsay-app\"  IMAGE_ID\n               _\n ___  ___ __ _| | _____      ____ _ _   _\n/ __|/ __/ _` | |/ _ \\ \\ /\\ / / _` | | | |\n\\__ \\ (_| (_| | |  __/\\ V  V / (_| | |_| |\n|___/\\___\\__,_|_|\\___| \\_/\\_/ \\__,_|\\__, |\n                                    |___/\n...\n\nroot@cowsay-app:~# cowsay \"Hello from my app\"\n ____________________________\n\u003c Hello from my app \u003e\n ----------------------------\n        \\   ^__^\n         \\  (oo)\\_______\n            (__)\\       )\\/\\\n                ||----w |\n                ||     ||\n```\n\n---\n\n## Multiarch\n\nBy default `make image_on_local` use your architecture (x86_64 on C2/VPS and armv7l on C1), if you want to craft your image in arm you must specify the architecture with `armv7l`\n\n```console\n# works only on C2/VPS\nARCH=armv7l make image_on_local\n```\n\nOr run image-builder with C1\n\n```console\nroot@yourmachine\u003e scw run --name=\"arm-builder\" --commercial-type=C1 image-builder\n```\n\n\n---\n\n## Distribution\n\nYou can contact the admins of #scaleway on `irc.online.net`.\n\n---\n## Know issues\n\n- if you have an error when you try to connect on your Scaleway account, remove `~/.scwrc` and retry\n\n## Changelog\n\n### 1.4.3 (2016-10-24)\n\n* Bump scw @1.10.1\n\n### 1.4.2 (2016-04-04)\n\n* Bump scw @1.9.0\n\n### 1.4.1 (2016-03-30)\n\n* Use 50GB instead of 150GB\n* Bump scw @1.8.1\n\n### 1.4.0 (2016-03-21)\n* Multiarch documentation\n* Bump scw to 1.8.0\n* Improved image-builder-configure (now he don't ask for login/password is ~/.scwrc already exist)\n\n### 1.3.0 (2015-09-11)\n\n* Bumped scw to 1.5.0\n* Added a local webserver\n* Put the generation of the key in rc.local\n\n### 1.2.0 (2015-08-28)\n\n* Bumped scw to 1.4.0\n* Improved image-builder-configure\n\n### 1.1.0 (2015-08-06)\n\n* Improved image-builder-configure (bash now)\n* Added the S3_URL in the image-builder-configure script\n* Added new script to check if your environment is configured as well\n\n### 1.0.0 (2015-08-05)\n\nThis initial version contains:\n\n* Added scw s3cwd\n* Added ssh key\n* Added script to preconfigure your environment\n\n\n## Links\n- [Maartje Eyskens: Multiarch Docker images](https://eyskens.me/multiarch-docker-images/)\n\n---\n\n#### A note about the Makefile system\n\nAll our images are using a simple Makefile containing only variables and including the [docker-rules.mk](https://github.com/scaleway/image-tools/blob/master/builder/docker-rules.mk) file that is downloaded on the first run.\n\nThe `docker-rules.mk` script is [regularly updated](https://github.com/scaleway/image-tools/commits/master/builder/docker-rules.mk), so it is more convenient to keep downloading a fresh copy regularly.\n\nWe are using a `curl ... | bash` install method which can be considered as unsafe. But this command is only used in the build step of the image, as soon as you start a Scaleway server, this command won't be run.\n\n---\n\nA project by [![Scaleway](https://avatars1.githubusercontent.com/u/5185491?v=3\u0026s=42)](https://www.scaleway.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaleway%2Fimage-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscaleway%2Fimage-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaleway%2Fimage-builder/lists"}