Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:guide-user:virtualization:obtain.firmware.docker [2023/03/02 12:56] – [Building OpenWRT using Docker] oliv3rdocs:guide-user:virtualization:obtain.firmware.docker [2024/09/25 17:09] (current) – symlink already present with latest alpine image and py3-distutils-extra is missing as was deprecated https://peps.python.org/pep-0632/ aivaras-s
Line 4: Line 4:
  
 You can use a premade [[https://www.docker.io/|Docker]] image to build yourself an OpenWrt firmware image. A list of known such Docker images (see instructions how to use them on their pages): You can use a premade [[https://www.docker.io/|Docker]] image to build yourself an OpenWrt firmware image. A list of known such Docker images (see instructions how to use them on their pages):
-  * [[https://gitlab.com/openwrt/docker|Official OpenWRT Docker images]] which can be pulled from [[https://hub.docker.com/u/openwrtorg|Docker hub]]+  * [[https://github.com/openwrt/docker|Official OpenWRT Docker images]] which can be pulled from [[https://hub.docker.com/r/openwrt|Docker hub]]
   * [[https://github.com/noonien/docker-openwrt-buildroot|noonien/docker-openwrt-buildroot]]   * [[https://github.com/noonien/docker-openwrt-buildroot|noonien/docker-openwrt-buildroot]]
   * [[https://github.com/galalmounir/openwrt-image-builder|galalmounir/openwrt-image-builder]]   * [[https://github.com/galalmounir/openwrt-image-builder|galalmounir/openwrt-image-builder]]
Line 57: Line 57:
     'wget' \     'wget' \
     'zlib-dev' \     'zlib-dev' \
 +    'py3-distutils-extra' \
   && \   && \
-  ln -s '/usr/lib/libncurses.so' '/usr/lib/libtinfo.so' && \ 
   addgroup 'buildbot' && \   addgroup 'buildbot' && \
   adduser -s '/bin/bash' -G 'buildbot' -D 'buildbot'   adduser -s '/bin/bash' -G 'buildbot' -D 'buildbot'
Line 100: Line 100:
 After placing (either) downloading either/both of these files, a OpenWRT repository is needed. After cloning or downloading the OpenWRT repository it might be a thought to create a dedicated worktree, when not wanting to build using master. <code>cd <openwrt repo>; git worktree add ../openwrt-<branch name> -b <branch name>; cd ../openwrt-<branch name></code>. This will create a new git branch and check it out on a worktree. After placing (either) downloading either/both of these files, a OpenWRT repository is needed. After cloning or downloading the OpenWRT repository it might be a thought to create a dedicated worktree, when not wanting to build using master. <code>cd <openwrt repo>; git worktree add ../openwrt-<branch name> -b <branch name>; cd ../openwrt-<branch name></code>. This will create a new git branch and check it out on a worktree.
  
-Next, the container is to be built, using either <code>podman</code> or <code>docker</code>.+Next, the container is to be built, using either **podman** or **docker**.
  
 Note, while not strictly necessary, we don't want to copy all of the repository files into the container context. Doing so won't hurt or break anything, but it wastes space and costs time and won't even be accessible when running the container. Note, while not strictly necessary, we don't want to copy all of the repository files into the container context. Doing so won't hurt or break anything, but it wastes space and costs time and won't even be accessible when running the container.
  
-To avoid copying needless files, a <code>.dockerignore</code> file is used, which can be either in the same location as the Dockerfile or in the current working directory.+To avoid copying needless files, a //.dockerignore/file is used, which can be either in the same location as the //Dockerfile// or in the current working directory.
  
 <code> <code>
Line 123: Line 123:
 </code> </code>
 From here, any normal OpenWRT command can be used as expected (`make menuconfig` etc). It is recommended to create an alias such as From here, any normal OpenWRT command can be used as expected (`make menuconfig` etc). It is recommended to create an alias such as
-`alias make='make -j10 V=sc'to build more verbose with multiple jobs, but this is completely optional.+<code>alias make='make -j10 V=sc'</code> to build more verbose with multiple jobs, but this is completely optional.
  
 ===== OpenWrt Cloud Builder API ===== ===== OpenWrt Cloud Builder API =====
  • Last modified: 2023/03/02 12:56
  • by oliv3r