├── .github └── workflows │ └── build.yaml ├── README.md ├── alma ├── Dockerfile └── helpers │ ├── build.sh │ ├── create_hosts_file.service │ ├── hosts │ ├── override.conf │ └── remove_dockerenv_file.service ├── alpine ├── Dockerfile └── helpers │ ├── build.sh │ └── inittab ├── centos-stream ├── Dockerfile └── helpers │ ├── build.sh │ ├── create_hosts_file.service │ ├── hosts │ ├── override.conf │ └── remove_dockerenv_file.service ├── debian ├── Dockerfile └── helpers │ ├── build.sh │ ├── create_hosts_file.service │ ├── hosts │ ├── locale │ ├── locale.conf │ ├── makedev │ ├── override.conf │ └── regenerate_ssh_host_keys.service ├── devuan ├── Dockerfile └── helpers │ ├── build.sh │ ├── hosts │ ├── locale │ ├── locale.conf │ ├── makedev │ └── rc.keys.ssh ├── fedora ├── Dockerfile └── helpers │ ├── build.sh │ ├── create_hosts_file.service │ ├── hosts │ ├── override.conf │ └── remove_dockerenv_file.service ├── rocky ├── Dockerfile └── helpers │ ├── build.sh │ ├── create_hosts_file.service │ ├── hosts │ ├── override.conf │ └── remove_dockerenv_file.service ├── ubuntu ├── Dockerfile └── helpers │ ├── build.sh │ ├── create_hosts_file.service │ ├── hosts │ ├── locale │ ├── locale.conf │ ├── locale.gen │ ├── makedev │ ├── override.conf │ ├── override22.conf │ ├── regenerate_ssh_host_keys.service │ └── remove_dockerenv_file.service └── void ├── Dockerfile └── helpers └── build.sh /.github/workflows/build.yaml: -------------------------------------------------------------------------------- 1 | # trigger rebuild 2 | name: Build LX Images 3 | on: 4 | workflow_dispatch: 5 | push: 6 | paths-ignore: 7 | - '**.md' 8 | branches: 9 | - master 10 | jobs: 11 | prepare: 12 | name: Create Release 13 | runs-on: ubuntu-latest 14 | outputs: 15 | upload_url: ${{ steps.create_release.outputs.upload_url }} 16 | tag: ${{ steps.build_tag.outputs.tag }} 17 | steps: 18 | - name: Create Time Stamp Tag 19 | id: build_tag 20 | run: date +'tag=%Y-%m-%d_%H-%M-%S' >> $GITHUB_OUTPUT 21 | 22 | - name: Create Release 23 | id: create_release 24 | uses: ncipollo/release-action@v1.11.1 25 | with: 26 | token: ${{ secrets.GITHUB_TOKEN }} 27 | tag: ${{ steps.build_tag.outputs.tag }} 28 | name: Release ${{ steps.build_tag.outputs.tag }} 29 | draft: false 30 | prerelease: false 31 | 32 | ubuntu: 33 | needs: prepare 34 | strategy: 35 | matrix: 36 | RELEASE: 37 | - 24.04 38 | - 22.04 39 | - 20.04 40 | 41 | name: Build Ubuntu ${{ matrix.RELEASE }} 42 | runs-on: ubuntu-latest 43 | steps: 44 | - name: Checkout 45 | uses: actions/checkout@v3 46 | 47 | - name: Build Image 48 | id: build_image 49 | run: | 50 | set -xe 51 | cd ubuntu 52 | tar=lx-ubuntu-${{ matrix.RELEASE }}.tar 53 | tag=release:$$ 54 | docker build --tag $tag --build-arg UBUNTU_RELEASE=${{ matrix.RELEASE }} . 55 | container=$(docker create $tag) 56 | docker cp $container:. - > $tar 57 | docker rm $container 58 | docker rmi $tag 59 | xz $tar 60 | - name: Upload Release Asset 61 | id: upload_release_asset 62 | uses: actions/upload-release-asset@v1 63 | env: 64 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 65 | with: 66 | upload_url: ${{ needs.prepare.outputs.upload_url }} 67 | asset_path: ./ubuntu/lx-ubuntu-${{ matrix.RELEASE }}.tar.xz 68 | asset_name: lx-ubuntu-${{ matrix.RELEASE }}-${{ needs.prepare.outputs.tag }}.tar.xz 69 | asset_content_type: application/x-xz 70 | 71 | debian: 72 | needs: prepare 73 | strategy: 74 | matrix: 75 | RELEASE: 76 | - bookworm 77 | - bullseye 78 | 79 | name: Build Debian ${{ matrix.RELEASE }} 80 | runs-on: ubuntu-latest 81 | steps: 82 | - name: Checkout 83 | uses: actions/checkout@v3 84 | 85 | - name: Build Image 86 | id: build_image 87 | run: | 88 | set -xe 89 | cd debian 90 | tar=lx-debian-${{ matrix.RELEASE }}.tar 91 | tag=release:$$ 92 | docker build --tag $tag --build-arg DEBIAN_RELEASE=${{ matrix.RELEASE }} . 93 | container=$(docker create $tag) 94 | docker cp $container:. - > $tar 95 | docker rm $container 96 | docker rmi $tag 97 | xz $tar 98 | - name: Upload Release Asset 99 | id: upload_release_asset 100 | uses: actions/upload-release-asset@v1 101 | env: 102 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 103 | with: 104 | upload_url: ${{ needs.prepare.outputs.upload_url }} 105 | asset_path: ./debian/lx-debian-${{ matrix.RELEASE }}.tar.xz 106 | asset_name: lx-debian-${{ matrix.RELEASE }}-${{ needs.prepare.outputs.tag }}.tar.xz 107 | asset_content_type: application/x-xz 108 | 109 | devuan: 110 | needs: prepare 111 | strategy: 112 | matrix: 113 | RELEASE: 114 | - daedalus 115 | - chimaera 116 | 117 | name: Build Devuan ${{ matrix.RELEASE }} 118 | runs-on: ubuntu-latest 119 | steps: 120 | - name: Checkout 121 | uses: actions/checkout@v3 122 | 123 | - name: Build Image 124 | id: build_image 125 | run: | 126 | set -xe 127 | cd devuan 128 | tar=lx-devuan-${{ matrix.RELEASE }}.tar 129 | tag=release:$$ 130 | docker build --tag $tag --build-arg DEVUAN_RELEASE=${{ matrix.RELEASE }} . 131 | container=$(docker create $tag) 132 | docker cp $container:. - > $tar 133 | docker rm $container 134 | docker rmi $tag 135 | xz $tar 136 | - name: Upload Release Asset 137 | id: upload_release_asset 138 | uses: actions/upload-release-asset@v1 139 | env: 140 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 141 | with: 142 | upload_url: ${{ needs.prepare.outputs.upload_url }} 143 | asset_path: ./devuan/lx-devuan-${{ matrix.RELEASE }}.tar.xz 144 | asset_name: lx-devuan-${{ matrix.RELEASE }}-${{ needs.prepare.outputs.tag }}.tar.xz 145 | asset_content_type: application/x-xz 146 | 147 | void: 148 | needs: prepare 149 | 150 | name: Build void image 151 | runs-on: ubuntu-latest 152 | steps: 153 | - name: Checkout 154 | uses: actions/checkout@v3 155 | 156 | - name: Build Image 157 | id: build_image 158 | run: | 159 | cd void 160 | tar=lx-void.tar 161 | tag=release:$$ 162 | docker build --tag $tag . 163 | container=$(docker create $tag) 164 | docker cp $container:. - > $tar 165 | docker rm $container 166 | docker rmi $tag 167 | xz $tar 168 | - name: Upload Release Asset 169 | id: upload_release_asset 170 | uses: actions/upload-release-asset@v1 171 | env: 172 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 173 | with: 174 | upload_url: ${{ needs.prepare.outputs.upload_url }} 175 | asset_path: ./void/lx-void.tar.xz 176 | asset_name: lx-void-${{ needs.prepare.outputs.tag }}.tar.xz 177 | asset_content_type: application/x-xz 178 | 179 | centos-stream: 180 | needs: prepare 181 | strategy: 182 | matrix: 183 | RELEASE: 184 | - 9 185 | 186 | name: Build Centos Stream ${{ matrix.RELEASE }} 187 | runs-on: ubuntu-latest 188 | steps: 189 | - name: Checkout 190 | uses: actions/checkout@v3 191 | 192 | - name: Build Image 193 | id: build_image 194 | run: | 195 | set -xe 196 | cd centos-stream 197 | tar=lx-centos-stream-${{ matrix.RELEASE }}.tar 198 | tag=release:$$ 199 | docker build --tag $tag --build-arg CENTOS_RELEASE=stream${{ matrix.RELEASE }} . 200 | container=$(docker create $tag) 201 | docker cp $container:. - > $tar 202 | docker rm $container 203 | docker rmi $tag 204 | xz $tar 205 | - name: Upload Release Asset 206 | id: upload_release_asset 207 | uses: actions/upload-release-asset@v1 208 | env: 209 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 210 | with: 211 | upload_url: ${{ needs.prepare.outputs.upload_url }} 212 | asset_path: ./centos-stream/lx-centos-stream-${{ matrix.RELEASE }}.tar.xz 213 | asset_name: lx-centos-stream-${{ matrix.RELEASE }}-${{ needs.prepare.outputs.tag }}.tar.xz 214 | asset_content_type: application/x-xz 215 | 216 | fedora: 217 | needs: prepare 218 | strategy: 219 | matrix: 220 | RELEASE: 221 | - 41 222 | 223 | name: Build fedora ${{ matrix.RELEASE }} 224 | runs-on: ubuntu-latest 225 | steps: 226 | - name: Checkout 227 | uses: actions/checkout@v3 228 | 229 | - name: Build Image 230 | id: build_image 231 | run: | 232 | set -xe 233 | cd fedora 234 | tar=lx-fedora-${{ matrix.RELEASE }}.tar 235 | tag=release:$$ 236 | docker build --tag $tag --build-arg FEDORA_RELEASE=${{ matrix.RELEASE }} . 237 | container=$(docker create $tag) 238 | docker cp $container:. - > $tar 239 | docker rm $container 240 | docker rmi $tag 241 | xz $tar 242 | - name: Upload Release Asset 243 | id: upload_release_asset 244 | uses: actions/upload-release-asset@v1 245 | env: 246 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 247 | with: 248 | upload_url: ${{ needs.prepare.outputs.upload_url }} 249 | asset_path: ./fedora/lx-fedora-${{ matrix.RELEASE }}.tar.xz 250 | asset_name: lx-fedora-${{ matrix.RELEASE }}-${{ needs.prepare.outputs.tag }}.tar.xz 251 | asset_content_type: application/x-xz 252 | 253 | alma: 254 | needs: prepare 255 | strategy: 256 | matrix: 257 | RELEASE: 258 | - 8 259 | - 9 260 | 261 | name: Build AlmaLinux ${{ matrix.RELEASE }} 262 | runs-on: ubuntu-latest 263 | steps: 264 | - name: Checkout 265 | uses: actions/checkout@v3 266 | 267 | - name: Build Image 268 | id: build_image 269 | run: | 270 | set -xe 271 | cd alma 272 | tar=lx-alma-${{ matrix.RELEASE }}.tar 273 | tag=release:$$ 274 | docker build --tag $tag --build-arg ALMA_RELEASE=${{ matrix.RELEASE }} . 275 | container=$(docker create $tag) 276 | docker cp $container:. - > $tar 277 | docker rm $container 278 | docker rmi $tag 279 | xz $tar 280 | - name: Upload Release Asset 281 | id: upload_release_asset 282 | uses: actions/upload-release-asset@v1 283 | env: 284 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 285 | with: 286 | upload_url: ${{ needs.prepare.outputs.upload_url }} 287 | asset_path: ./alma/lx-alma-${{ matrix.RELEASE }}.tar.xz 288 | asset_name: lx-alma-${{ matrix.RELEASE }}-${{ needs.prepare.outputs.tag }}.tar.xz 289 | asset_content_type: application/x-xz 290 | rocky: 291 | needs: prepare 292 | strategy: 293 | matrix: 294 | RELEASE: 295 | - 8 296 | - 9 297 | 298 | name: Build RockyLinux ${{ matrix.RELEASE }} 299 | runs-on: ubuntu-latest 300 | steps: 301 | - name: Checkout 302 | uses: actions/checkout@v3 303 | 304 | - name: Build Image 305 | id: build_image 306 | run: | 307 | set -xe 308 | cd rocky 309 | tar=lx-rocky-${{ matrix.RELEASE }}.tar 310 | tag=release:$$ 311 | docker build --tag $tag --build-arg ROCKY_RELEASE=${{ matrix.RELEASE }} . 312 | container=$(docker create $tag) 313 | docker cp $container:. - > $tar 314 | docker rm $container 315 | docker rmi $tag 316 | xz $tar 317 | - name: Upload Release Asset 318 | id: upload_release_asset 319 | uses: actions/upload-release-asset@v1 320 | env: 321 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 322 | with: 323 | upload_url: ${{ needs.prepare.outputs.upload_url }} 324 | asset_path: ./rocky/lx-rocky-${{ matrix.RELEASE }}.tar.xz 325 | asset_name: lx-rocky-${{ matrix.RELEASE }}-${{ needs.prepare.outputs.tag }}.tar.xz 326 | asset_content_type: application/x-xz 327 | 328 | alpine: 329 | needs: prepare 330 | strategy: 331 | matrix: 332 | RELEASE: 333 | - 3 334 | 335 | name: Build Alpine Linux ${{ matrix.RELEASE }} 336 | runs-on: ubuntu-latest 337 | steps: 338 | - name: Checkout 339 | uses: actions/checkout@v3 340 | 341 | - name: Build Image 342 | id: build_image 343 | run: | 344 | set -xe 345 | cd alpine 346 | tar=lx-alpine-${{ matrix.RELEASE }}.tar 347 | tag=release:$$ 348 | docker build --tag $tag --build-arg ALPINE_RELEASE=${{ matrix.RELEASE }} . 349 | container=$(docker create $tag) 350 | docker cp $container:. - > $tar 351 | docker rm $container 352 | docker rmi $tag 353 | xz $tar 354 | - name: Upload Release Asset 355 | id: upload_release_asset 356 | uses: actions/upload-release-asset@v1 357 | env: 358 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 359 | with: 360 | upload_url: ${{ needs.prepare.outputs.upload_url }} 361 | asset_path: ./alpine/lx-alpine-${{ matrix.RELEASE }}.tar.xz 362 | asset_name: lx-alpine-${{ matrix.RELEASE }}-${{ needs.prepare.outputs.tag }}.tar.xz 363 | asset_content_type: application/x-xz 364 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Automated build System for LX Images 2 | 3 | ![Build LX Images](https://github.com/omniosorg/lx-images/workflows/Build%20LX%20Images/badge.svg) 4 | 5 | Curently the following linuxes are supported 6 | 7 | * Ubuntu 20.04 8 | * Ubuntu 22.04 9 | * Ubuntu 24.04 10 | * Debian Bullseye 11 | * Debian Bookworm 12 | * Devuan Chimeara 13 | * Devuan Daedalus 14 | * Void Linux 15 | * CentOS stream 9 16 | * Fedora 41 17 | * Alpine 3 18 | * Alma 8 19 | * Alma 9 20 | 21 | See [Releases](https://github.com/omniosorg/lx-images/releases) for image downloads. 22 | -------------------------------------------------------------------------------- /alma/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG ALMA_RELEASE 2 | FROM almalinux:${ALMA_RELEASE} 3 | COPY helpers /helpers 4 | ARG ALMA_RELEASE=${ALMA_RELEASE} 5 | RUN cd /helpers && sh build.sh && cd / && rm -rf helpers 6 | -------------------------------------------------------------------------------- /alma/helpers/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -ex 3 | echo Installing AlmaLinux $ALMA_RELEASE 4 | dnf update -y 5 | dnf install -y --allowerasing \ 6 | cronie \ 7 | systemd-sysv \ 8 | vim \ 9 | binutils \ 10 | dialog \ 11 | diffutils \ 12 | iputils \ 13 | langpacks-en \ 14 | glibc-langpack-en \ 15 | openssh-server \ 16 | openssh-clients \ 17 | passwd \ 18 | procps-ng \ 19 | rsyslog \ 20 | sudo \ 21 | curl \ 22 | less \ 23 | man-db \ 24 | bind-utils \ 25 | net-tools 26 | 27 | 28 | # disable services we do not need 29 | systemctl mask systemd-remount-fs.service 30 | systemctl mask systemd-resolved fstrim.timer fstrim 31 | systemctl mask e2scrub_reap e2scrub_all e2scrub_all.timer 32 | 33 | # disable systemd features not present in lx (e.g. cgroup support) 34 | for S in \ 35 | systemd-hostnamed systemd-localed systemd-timedated systemd-logind \ 36 | systemd-initctl systemd-journald 37 | do 38 | O=/etc/systemd/system/${S}.service.d 39 | mkdir -p $O 40 | cp override.conf ${O}/override.conf 41 | done 42 | 43 | # This service doesn't exist yet but systemd will happily create the /dev/null 44 | # mapping for it. It comes in with nfs-common and fails because lx doesn't know 45 | # about rpc_pipefs. NFSv4 still seems to mount without this service and 46 | # lx_lockd is still started. Let's hide it from the user so they see don't see 47 | # unecessary failed services. 48 | systemctl mask run-rpc_pipefs.mount 49 | 50 | # lx hosts file 51 | cp hosts /etc/hosts.lx 52 | 53 | # make sure we get fresh ssh keys on first boot 54 | # note that alma uses the sshd-keygen@.service to regenerate missing keys 55 | /bin/rm -f -v /etc/ssh/ssh_host_*_key* 56 | 57 | # hostfile fix 58 | cp create_hosts_file.service /etc/systemd/system 59 | systemctl enable create_hosts_file.service 60 | 61 | # remove .dockerenv file because lx is not a docker 62 | cp remove_dockerenv_file.service /etc/systemd/system 63 | systemctl enable remove_dockerenv_file.service 64 | 65 | # some smf helper folders 66 | mkdir -p /var/svc /var/db 67 | -------------------------------------------------------------------------------- /alma/helpers/create_hosts_file.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Create a Hostfile 3 | After=network.target auditd.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/mv /etc/hosts.lx /etc/hosts 8 | ExecStart=/bin/sed -i s/HOSTNAME/%H/g /etc/hosts 9 | ExecStartPost=/bin/systemctl disable create_hosts_file.service 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | # last line 14 | -------------------------------------------------------------------------------- /alma/helpers/hosts: -------------------------------------------------------------------------------- 1 | # host file 2 | 127.0.0.1 localhost 3 | 127.0.1.1 HOSTNAME 4 | # The following lines are desirable for IPv6 capable hosts 5 | ::1 localhost ip6-localhost ip6-loopback 6 | ff02::1 ip6-allnodes 7 | ff02::2 ip6-allrouters 8 | # end 9 | -------------------------------------------------------------------------------- /alma/helpers/override.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | PrivateTmp=no 3 | PrivateDevices=no 4 | PrivateNetwork=no 5 | ProtectSystem=no 6 | NoNewPrivileges=no 7 | ProtectHome=no 8 | -------------------------------------------------------------------------------- /alma/helpers/remove_dockerenv_file.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Remove dockerenv file 3 | After=network.target auditd.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/rm -f /.dockerenv 8 | ExecStartPost=/bin/systemctl disable remove_dockerenv_file.service 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | # last line 13 | -------------------------------------------------------------------------------- /alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG ALPINE_RELEASE 2 | FROM alpine:${ALPINE_RELEASE} 3 | COPY helpers /helpers 4 | ARG ALPINE_RELEASE=${ALPINE_RELEASE} 5 | RUN cd /helpers && sh build.sh && cd / && rm -rf helpers 6 | -------------------------------------------------------------------------------- /alpine/helpers/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Update the package manager 4 | apk update 5 | # Update all packages 6 | apk upgrade 7 | 8 | # Install extras 9 | apk add -u \ 10 | alpine-base \ 11 | alpine-conf \ 12 | alpine-release \ 13 | apk-tools-doc \ 14 | bash \ 15 | bind-tools \ 16 | busybox-mdev-openrc \ 17 | busybox-openrc \ 18 | busybox-suid \ 19 | curl \ 20 | logrotate \ 21 | logrotate-openrc \ 22 | man-db \ 23 | man-pages \ 24 | mdev-conf \ 25 | openrc \ 26 | openssh \ 27 | sudo \ 28 | vim 29 | 30 | # Enable services 31 | rc-update add bootmisc boot 32 | rc-update add devfs boot 33 | rc-update add syslog boot 34 | rc-update add crond default 35 | rc-update add local default 36 | rc-update add sshd default 37 | -------------------------------------------------------------------------------- /alpine/helpers/inittab: -------------------------------------------------------------------------------- 1 | # /etc/inittab 2 | ::sysinit:/sbin/openrc sysinit 3 | ::sysinit:/sbin/openrc boot 4 | ::wait:/sbin/openrc default 5 | 6 | # Set up a couple of getty's 7 | ::respawn:/sbin/getty 38400 console 8 | 9 | # Stuff to do for the 3-finger salute 10 | ::ctrlaltdel:/sbin/reboot 11 | 12 | # Stuff to do before rebooting 13 | ::shutdown:/sbin/openrc shutdown 14 | -------------------------------------------------------------------------------- /centos-stream/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG CENTOS_RELEASE 2 | FROM quay.io/centos/centos:${CENTOS_RELEASE} 3 | COPY helpers /helpers 4 | ARG CENTOS_RELEASE=${CENTOS_RELEASE} 5 | RUN cd /helpers && sh build.sh && cd / && rm -rf helpers 6 | -------------------------------------------------------------------------------- /centos-stream/helpers/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -ex 3 | echo Installing Centos $CENTOS_RELEASE 4 | dnf update -y 5 | dnf install -y --allowerasing \ 6 | cronie \ 7 | systemd-sysv \ 8 | vim \ 9 | binutils \ 10 | dialog \ 11 | diffutils \ 12 | iputils \ 13 | langpacks-en \ 14 | glibc-langpack-en \ 15 | openssh-server \ 16 | openssh-clients \ 17 | passwd \ 18 | procps-ng \ 19 | rsyslog \ 20 | sudo \ 21 | curl \ 22 | less \ 23 | man-db \ 24 | bind-utils \ 25 | net-tools 26 | 27 | 28 | # disable services we do not need 29 | systemctl mask systemd-remount-fs.service 30 | systemctl mask systemd-resolved fstrim.timer fstrim 31 | systemctl mask e2scrub_reap e2scrub_all e2scrub_all.timer 32 | 33 | # disable systemd features not present in lx (e.g. cgroup support) 34 | for S in \ 35 | systemd-hostnamed systemd-localed systemd-timedated systemd-logind \ 36 | systemd-initctl systemd-journald 37 | do 38 | O=/etc/systemd/system/${S}.service.d 39 | mkdir -p $O 40 | cp override.conf ${O}/override.conf 41 | done 42 | 43 | # This service doesn't exist yet but systemd will happily create the /dev/null 44 | # mapping for it. It comes in with nfs-common and fails because lx doesn't know 45 | # about rpc_pipefs. NFSv4 still seems to mount without this service and 46 | # lx_lockd is still started. Let's hide it from the user so they see don't see 47 | # unecessary failed services. 48 | systemctl mask run-rpc_pipefs.mount 49 | 50 | # lx hosts file 51 | cp hosts /etc/hosts.lx 52 | 53 | # make sure we get fresh ssh keys on first boot 54 | # note that centos uses the sshd-keygen@.service to regenerate missing keys 55 | /bin/rm -f -v /etc/ssh/ssh_host_*_key* 56 | 57 | # hostfile fix 58 | cp create_hosts_file.service /etc/systemd/system 59 | systemctl enable create_hosts_file.service 60 | 61 | # remove .dockerenv file because lx is not a docker 62 | cp remove_dockerenv_file.service /etc/systemd/system 63 | systemctl enable remove_dockerenv_file.service 64 | 65 | # some smf helper folders 66 | mkdir -p /var/svc /var/db 67 | -------------------------------------------------------------------------------- /centos-stream/helpers/create_hosts_file.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Create a Hostfile 3 | After=network.target auditd.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/mv /etc/hosts.lx /etc/hosts 8 | ExecStart=/bin/sed -i s/HOSTNAME/%H/g /etc/hosts 9 | ExecStartPost=/bin/systemctl disable create_hosts_file.service 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | # last line 14 | -------------------------------------------------------------------------------- /centos-stream/helpers/hosts: -------------------------------------------------------------------------------- 1 | # host file 2 | 127.0.0.1 localhost 3 | 127.0.1.1 HOSTNAME 4 | # The following lines are desirable for IPv6 capable hosts 5 | ::1 localhost ip6-localhost ip6-loopback 6 | ff02::1 ip6-allnodes 7 | ff02::2 ip6-allrouters 8 | # end 9 | -------------------------------------------------------------------------------- /centos-stream/helpers/override.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | PrivateTmp=no 3 | PrivateDevices=no 4 | PrivateNetwork=no 5 | ProtectSystem=no 6 | NoNewPrivileges=no 7 | ProtectHome=no 8 | -------------------------------------------------------------------------------- /centos-stream/helpers/remove_dockerenv_file.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Remove dockerenv file 3 | After=network.target auditd.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/rm -f /.dockerenv 8 | ExecStartPost=/bin/systemctl disable remove_dockerenv_file.service 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | # last line 13 | -------------------------------------------------------------------------------- /debian/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG DEBIAN_RELEASE 2 | FROM debian:${DEBIAN_RELEASE} 3 | ARG DEBIAN_RELEASE 4 | ENV DEBIAN_RELEASE ${DEBIAN_RELEASE} 5 | COPY helpers /helpers 6 | RUN cd /helpers && sh build.sh && cd / && rm -rf helpers 7 | -------------------------------------------------------------------------------- /debian/helpers/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -ex 3 | echo Installing Debian $DEBIAN_RELEASE 4 | export DEBIAN_FRONTEND=noninteractive 5 | 6 | apt-get update 7 | apt-get install -yq apt-utils 8 | apt-get install -yq \ 9 | systemd-sysv \ 10 | vim \ 11 | binutils \ 12 | cron \ 13 | dialog \ 14 | openssh-server \ 15 | sudo \ 16 | iproute2 \ 17 | curl \ 18 | lsb-release \ 19 | less \ 20 | joe \ 21 | man-db \ 22 | net-tools \ 23 | locales \ 24 | rsync \ 25 | tzdata \ 26 | rsyslog \ 27 | iputils-ping 28 | apt-get -qq clean 29 | rm -rf /var/lib/apt/lists/* 30 | apt-get -qq autoremove 31 | 32 | # disable services we do not need 33 | systemctl disable \ 34 | systemd-resolved fstrim.timer fstrim \ 35 | e2scrub_reap e2scrub_all e2scrub_all.timer 36 | 37 | # disable systemd features not present in lx (e.g. cgroup support) 38 | for S in \ 39 | systemd-hostnamed systemd-localed systemd-timedated \ 40 | systemd-logind systemd-initctl systemd-journald 41 | do 42 | O=/etc/systemd/system/${S}.service.d 43 | mkdir -p $O 44 | cp override.conf ${O}/override.conf 45 | done 46 | 47 | # Prevents apt-get upgrade issue when upgrading in a container environment. 48 | cp makedev /etc/apt/preferences.d/makedev 49 | cp locale.conf /etc/locale.conf 50 | cp locale /etc/default/locale 51 | cp hosts /etc/hosts.lx 52 | 53 | # Generate missing locales 54 | locale-gen 55 | 56 | # make sure we get fresh ssh keys on first boot 57 | /bin/rm -f -v /etc/ssh/ssh_host_*_key* 58 | cp regenerate_ssh_host_keys.service /etc/systemd/system 59 | systemctl enable regenerate_ssh_host_keys 60 | 61 | # hostfile fix 62 | cp create_hosts_file.service /etc/systemd/system 63 | systemctl enable create_hosts_file.service 64 | 65 | # add dtrace tools 66 | curl -sSLO https://mirrors.omnios.org/lx/dtracetools-lx_1.0_amd64.deb 67 | dpkg -i dtracetools-lx_1.0_amd64.deb 68 | rm dtracetools-lx_1.0_amd64.deb 69 | 70 | # some smf helper folders 71 | mkdir -p /var/svc /var/db 72 | 73 | # remove .dockerenv file because lx is not a docker 74 | rm -f /.dockerenv 75 | -------------------------------------------------------------------------------- /debian/helpers/create_hosts_file.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Create a Hostfile 3 | After=network.target auditd.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/mv /etc/hosts.lx /etc/hosts 8 | ExecStart=/bin/sed -i s/HOSTNAME/%H/g /etc/hosts 9 | ExecStartPost=/bin/systemctl disable create_hosts_file.service 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | # last line 14 | -------------------------------------------------------------------------------- /debian/helpers/hosts: -------------------------------------------------------------------------------- 1 | # host file 2 | 127.0.0.1 localhost 3 | 127.0.1.1 HOSTNAME 4 | # The following lines are desirable for IPv6 capable hosts 5 | ::1 localhost ip6-localhost ip6-loopback 6 | ff02::1 ip6-allnodes 7 | ff02::2 ip6-allrouters 8 | # end 9 | -------------------------------------------------------------------------------- /debian/helpers/locale: -------------------------------------------------------------------------------- 1 | LANG=C 2 | -------------------------------------------------------------------------------- /debian/helpers/locale.conf: -------------------------------------------------------------------------------- 1 | LANG=en_US.UTF8 2 | -------------------------------------------------------------------------------- /debian/helpers/makedev: -------------------------------------------------------------------------------- 1 | Package: makedev 2 | Pin: release * 3 | Pin-Priority: -1 4 | -------------------------------------------------------------------------------- /debian/helpers/override.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | PrivateTmp=no 3 | PrivateDevices=no 4 | PrivateNetwork=no 5 | ProtectSystem=no 6 | NoNewPrivileges=no 7 | ProtectHome=no 8 | -------------------------------------------------------------------------------- /debian/helpers/regenerate_ssh_host_keys.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Regenerate SSH host keys 3 | Before=ssh.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/usr/bin/ssh-keygen -A -v 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | # last line 12 | -------------------------------------------------------------------------------- /devuan/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG DEVUAN_RELEASE 2 | FROM dyne/devuan:${DEVUAN_RELEASE} 3 | ARG DEVUAN_RELEASE 4 | ENV DEVUAN_RELEASE ${DEVUAN_RELEASE} 5 | COPY helpers /helpers 6 | RUN cd /helpers && sh build.sh && cd / && rm -rf helpers 7 | -------------------------------------------------------------------------------- /devuan/helpers/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -ex 3 | echo Installing Devuan $DEVUAN_RELEASE 4 | export DEBIAN_FRONTEND=noninteractive 5 | 6 | apt-get update 7 | apt-get install -yq apt-utils 8 | apt-get install -yq \ 9 | vim \ 10 | binutils \ 11 | cron \ 12 | dialog \ 13 | openssh-server \ 14 | sudo \ 15 | iproute2 \ 16 | curl \ 17 | lsb-release \ 18 | less \ 19 | joe \ 20 | man-db \ 21 | net-tools \ 22 | locales \ 23 | rsync \ 24 | tzdata \ 25 | rsyslog \ 26 | iputils-ping 27 | # Remove the elogind session manager - this will cause the alternative 28 | # consolekit to be installed automatically 29 | apt-get remove -yq elogind 30 | apt-get -qq clean 31 | rm -rf /var/lib/apt/lists/* 32 | apt-get -qq autoremove 33 | 34 | # Prevents apt-get upgrade issue when upgrading in a container environment. 35 | cp makedev /etc/apt/preferences.d/makedev 36 | cp locale.conf /etc/locale.conf 37 | cp locale /etc/default/locale 38 | #cp hosts /etc/hosts.lx 39 | 40 | # Generate missing locales 41 | locale-gen 42 | 43 | # make sure we get fresh ssh keys on first boot 44 | rm -fv /etc/ssh/ssh_host_*_key* 45 | cp rc.keys.ssh /etc/init.d/keys.ssh 46 | chmod +x /etc/init.d/keys.ssh 47 | update-rc.d keys.ssh defaults 48 | 49 | # 50 | #mv /usr/share/dbus-1/system-services/org.freedesktop.login1.service{,~} 51 | 52 | # add dtrace tools 53 | curl -sSLO https://mirrors.omnios.org/lx/dtracetools-lx_1.0_amd64.deb 54 | dpkg -i dtracetools-lx_1.0_amd64.deb 55 | rm dtracetools-lx_1.0_amd64.deb 56 | 57 | # some smf helper folders 58 | mkdir -p /var/svc /var/db 59 | 60 | # remove .dockerenv file because lx is not a docker 61 | rm -f /.dockerenv 62 | -------------------------------------------------------------------------------- /devuan/helpers/hosts: -------------------------------------------------------------------------------- 1 | # host file 2 | 127.0.0.1 localhost 3 | 127.0.1.1 HOSTNAME 4 | # The following lines are desirable for IPv6 capable hosts 5 | ::1 localhost ip6-localhost ip6-loopback 6 | ff02::1 ip6-allnodes 7 | ff02::2 ip6-allrouters 8 | # end 9 | -------------------------------------------------------------------------------- /devuan/helpers/locale: -------------------------------------------------------------------------------- 1 | LANG=C 2 | -------------------------------------------------------------------------------- /devuan/helpers/locale.conf: -------------------------------------------------------------------------------- 1 | LANG=en_US.UTF8 2 | -------------------------------------------------------------------------------- /devuan/helpers/makedev: -------------------------------------------------------------------------------- 1 | Package: makedev 2 | Pin: release * 3 | Pin-Priority: -1 4 | -------------------------------------------------------------------------------- /devuan/helpers/rc.keys.ssh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: keys.ssh 4 | # Required-Start: $local_fs $time 5 | # Required-Stop: $local_fs 6 | # Default-Start: 2 3 4 5 7 | # Default-Stop: 8 | # Short-Description: Generate ssh host keys if they are missing 9 | ### END INIT INFO 10 | 11 | . /lib/init/vars.sh 12 | . /lib/lsb/init-functions 13 | 14 | case "$1" in 15 | start|"") 16 | [ "$VERBOSE" = no ] || log_action_begin_msg "Generating SSH keys" 17 | /usr/bin/ssh-keygen -A -v 18 | ;; 19 | esac 20 | 21 | : 22 | -------------------------------------------------------------------------------- /fedora/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FEDORA_RELEASE 2 | FROM fedora:${FEDORA_RELEASE} 3 | COPY helpers /helpers 4 | ARG FEDORA_RELEASE=${FEDORA_RELEASE} 5 | RUN cd /helpers && sh build.sh && cd / && rm -rf helpers 6 | -------------------------------------------------------------------------------- /fedora/helpers/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -ex 3 | echo Installing Fedora $FEDORA_RELEASE 4 | dnf update -y 5 | dnf install -y --allowerasing \ 6 | cronie \ 7 | systemd-sysv \ 8 | vim \ 9 | binutils \ 10 | dialog \ 11 | diffutils \ 12 | iputils \ 13 | langpacks-en \ 14 | glibc-langpack-en \ 15 | openssh-server \ 16 | openssh-clients \ 17 | passwd \ 18 | procps-ng \ 19 | rsyslog \ 20 | sudo \ 21 | curl \ 22 | less \ 23 | man-db \ 24 | bind-utils \ 25 | net-tools 26 | 27 | 28 | # disable services we do not need 29 | systemctl mask systemd-remount-fs.service 30 | systemctl mask systemd-resolved fstrim.timer fstrim 31 | systemctl mask e2scrub_reap e2scrub_all e2scrub_all.timer 32 | 33 | # disable systemd features not present in lx (e.g. cgroup support) 34 | for S in \ 35 | systemd-hostnamed systemd-localed systemd-timedated systemd-logind \ 36 | systemd-initctl systemd-journald 37 | do 38 | O=/etc/systemd/system/${S}.service.d 39 | mkdir -p $O 40 | cp override.conf ${O}/override.conf 41 | done 42 | 43 | # This service doesn't exist yet but systemd will happily create the /dev/null 44 | # mapping for it. It comes in with nfs-common and fails because lx doesn't know 45 | # about rpc_pipefs. NFSv4 still seems to mount without this service and 46 | # lx_lockd is still started. Let's hide it from the user so they see don't see 47 | # unecessary failed services. 48 | systemctl mask run-rpc_pipefs.mount 49 | 50 | # lx hosts file 51 | cp hosts /etc/hosts.lx 52 | 53 | # make sure we get fresh ssh keys on first boot 54 | # note that fedora uses the sshd-keygen@.service to regenerate missing keys 55 | /bin/rm -f -v /etc/ssh/ssh_host_*_key* 56 | 57 | # hostfile fix 58 | cp create_hosts_file.service /etc/systemd/system 59 | systemctl enable create_hosts_file.service 60 | 61 | # remove .dockerenv file because lx is not a docker 62 | cp remove_dockerenv_file.service /etc/systemd/system 63 | systemctl enable remove_dockerenv_file.service 64 | 65 | # some smf helper folders 66 | mkdir -p /var/svc /var/db 67 | -------------------------------------------------------------------------------- /fedora/helpers/create_hosts_file.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Create a Hostfile 3 | After=network.target auditd.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/mv /etc/hosts.lx /etc/hosts 8 | ExecStart=/bin/sed -i s/HOSTNAME/%H/g /etc/hosts 9 | ExecStartPost=/bin/systemctl disable create_hosts_file.service 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | # last line 14 | -------------------------------------------------------------------------------- /fedora/helpers/hosts: -------------------------------------------------------------------------------- 1 | # host file 2 | 127.0.0.1 localhost 3 | 127.0.1.1 HOSTNAME 4 | # The following lines are desirable for IPv6 capable hosts 5 | ::1 localhost ip6-localhost ip6-loopback 6 | ff02::1 ip6-allnodes 7 | ff02::2 ip6-allrouters 8 | # end 9 | -------------------------------------------------------------------------------- /fedora/helpers/override.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | PrivateTmp=no 3 | PrivateDevices=no 4 | PrivateNetwork=no 5 | ProtectSystem=no 6 | NoNewPrivileges=no 7 | ProtectHome=no 8 | -------------------------------------------------------------------------------- /fedora/helpers/remove_dockerenv_file.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Remove dockerenv file 3 | After=network.target auditd.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/rm -f /.dockerenv 8 | ExecStartPost=/bin/systemctl disable remove_dockerenv_file.service 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | # last line 13 | -------------------------------------------------------------------------------- /rocky/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG ROCKY_RELEASE 2 | FROM rockylinux:${ROCKY_RELEASE} 3 | COPY helpers /helpers 4 | ARG ROCKY_RELEASE=${ROCKY_RELEASE} 5 | RUN cd /helpers && sh build.sh && cd / && rm -rf helpers 6 | -------------------------------------------------------------------------------- /rocky/helpers/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -ex 3 | echo Installing RockyLinux $ROCKY_RELEASE 4 | dnf update -y 5 | dnf install -y --allowerasing \ 6 | cronie \ 7 | systemd-sysv \ 8 | vim \ 9 | binutils \ 10 | dialog \ 11 | diffutils \ 12 | iputils \ 13 | langpacks-en \ 14 | glibc-langpack-en \ 15 | openssh-server \ 16 | openssh-clients \ 17 | passwd \ 18 | procps-ng \ 19 | rsyslog \ 20 | sudo \ 21 | curl \ 22 | less \ 23 | man-db \ 24 | bind-utils \ 25 | net-tools 26 | 27 | 28 | # disable services we do not need 29 | systemctl mask systemd-remount-fs.service 30 | systemctl mask systemd-resolved fstrim.timer fstrim 31 | systemctl mask e2scrub_reap e2scrub_all e2scrub_all.timer 32 | 33 | # disable systemd features not present in lx (e.g. cgroup support) 34 | for S in \ 35 | systemd-hostnamed systemd-localed systemd-timedated systemd-logind \ 36 | systemd-initctl systemd-journald 37 | do 38 | O=/etc/systemd/system/${S}.service.d 39 | mkdir -p $O 40 | cp override.conf ${O}/override.conf 41 | done 42 | 43 | # This service doesn't exist yet but systemd will happily create the /dev/null 44 | # mapping for it. It comes in with nfs-common and fails because lx doesn't know 45 | # about rpc_pipefs. NFSv4 still seems to mount without this service and 46 | # lx_lockd is still started. Let's hide it from the user so they see don't see 47 | # unecessary failed services. 48 | systemctl mask run-rpc_pipefs.mount 49 | 50 | # lx hosts file 51 | cp hosts /etc/hosts.lx 52 | 53 | # make sure we get fresh ssh keys on first boot 54 | # note that rocky uses the sshd-keygen@.service to regenerate missing keys 55 | /bin/rm -f -v /etc/ssh/ssh_host_*_key* 56 | 57 | # hostfile fix 58 | cp create_hosts_file.service /etc/systemd/system 59 | systemctl enable create_hosts_file.service 60 | 61 | # remove .dockerenv file because lx is not a docker 62 | cp remove_dockerenv_file.service /etc/systemd/system 63 | systemctl enable remove_dockerenv_file.service 64 | 65 | # some smf helper folders 66 | mkdir -p /var/svc /var/db 67 | -------------------------------------------------------------------------------- /rocky/helpers/create_hosts_file.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Create a Hostfile 3 | After=network.target auditd.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/mv /etc/hosts.lx /etc/hosts 8 | ExecStart=/bin/sed -i s/HOSTNAME/%H/g /etc/hosts 9 | ExecStartPost=/bin/systemctl disable create_hosts_file.service 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | # last line 14 | -------------------------------------------------------------------------------- /rocky/helpers/hosts: -------------------------------------------------------------------------------- 1 | # host file 2 | 127.0.0.1 localhost 3 | 127.0.1.1 HOSTNAME 4 | # The following lines are desirable for IPv6 capable hosts 5 | ::1 localhost ip6-localhost ip6-loopback 6 | ff02::1 ip6-allnodes 7 | ff02::2 ip6-allrouters 8 | # end 9 | -------------------------------------------------------------------------------- /rocky/helpers/override.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | PrivateTmp=no 3 | PrivateDevices=no 4 | PrivateNetwork=no 5 | ProtectSystem=no 6 | NoNewPrivileges=no 7 | ProtectHome=no 8 | -------------------------------------------------------------------------------- /rocky/helpers/remove_dockerenv_file.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Remove dockerenv file 3 | After=network.target auditd.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/rm -f /.dockerenv 8 | ExecStartPost=/bin/systemctl disable remove_dockerenv_file.service 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | # last line 13 | -------------------------------------------------------------------------------- /ubuntu/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG UBUNTU_RELEASE 2 | FROM ubuntu:${UBUNTU_RELEASE} 3 | COPY helpers /helpers 4 | ARG UBUNTU_RELEASE=${UBUNTU_RELEASE} 5 | RUN apt-get update && apt-get install -y systemd systemd-sysv systemd-timesyncd libnss-systemd libpam-systemd libsystemd0 networkd-dispatcher 6 | RUN cd /helpers && sh build.sh && cd / && rm -rf helpers 7 | -------------------------------------------------------------------------------- /ubuntu/helpers/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -ex 4 | echo Installing Ubuntu $UBUNTU_RELEASE 5 | export DEBIAN_FRONTEND=noninteractive 6 | apt-get update 7 | apt-get install -yq apt-utils 8 | if ! command -v unminimize; then 9 | apt-get install -yq unminimize 10 | fi 11 | yes | unminimize 12 | apt-get install -yq \ 13 | systemd-sysv \ 14 | vim \ 15 | binutils \ 16 | cron \ 17 | dialog \ 18 | openssh-server \ 19 | sudo \ 20 | iproute2 \ 21 | curl \ 22 | lsb-release \ 23 | less \ 24 | joe \ 25 | man-db \ 26 | net-tools \ 27 | iputils-ping \ 28 | locales \ 29 | rsync \ 30 | rsyslog \ 31 | tzdata 32 | apt-get -qq clean 33 | rm -rf /var/lib/apt/lists/* 34 | apt-get -qq autoremove 35 | 36 | # disable services we do not need 37 | systemctl mask systemd-remount-fs.service 38 | systemctl mask systemd-resolved fstrim.timer fstrim 39 | if [ ${UBUNTU_RELEASE} = "20.04" -o ${UBUNTU_RELEASE} = "22.04" ]; then 40 | systemctl mask e2scrub_reap e2scrub_all e2scrub_all.timer 41 | # systemd does not seem to realize that /dev/null is NOT a terminal 42 | # under lx but when trying to chown it, it fails and thus the `User=` 43 | # directive does not work properly ... this little trick fixes the 44 | # behavior for the user@.service but obviously it has to be fixed in 45 | # lx :) ... 46 | touch /etc/systemd/null 47 | mkdir -p /etc/systemd/system/user@.service.d 48 | echo "[Service]\nStandardInput=file:/etc/systemd/null\n" \ 49 | > /etc/systemd/system/user@.service.d/override.conf 50 | fi 51 | 52 | # disable systemd features not present in lx (e.g. cgroup support) 53 | for S in \ 54 | systemd-hostnamed systemd-localed systemd-timedated systemd-logind \ 55 | systemd-initctl systemd-journald systemd-sysusers 56 | do 57 | O=/etc/systemd/system/${S}.service.d 58 | mkdir -p $O 59 | if [ ${UBUNTU_RELEASE} = "22.04" ]; then 60 | cp override22.conf ${O}/override.conf 61 | else 62 | cp override.conf ${O}/override.conf 63 | fi 64 | done 65 | 66 | # This service doesn't exist yet but systemd will happily create the /dev/null 67 | # mapping for it. It comes in with nfs-common and fails because lx doesn't know 68 | # about rpc_pipefs. NFSv4 still seems to mount without this service and 69 | # lx_lockd is still started. Let's hide it from the user so they see don't see 70 | # unecessary failed services. 71 | systemctl mask run-rpc_pipefs.mount 72 | 73 | # Prevents apt-get upgrade issue when upgrading in a container environment. 74 | # Similar to https://bugs.launchpad.net/ubuntu/+source/makedev/+bug/1675163 75 | cp makedev /etc/apt/preferences.d/makedev 76 | cp locale.gen /etc/locale.gen 77 | cp locale.conf /etc/locale.conf 78 | cp locale /etc/default/locale 79 | cp hosts /etc/hosts.lx 80 | 81 | # Generate missing locales 82 | locale-gen 83 | 84 | # make sure we get fresh ssh keys on first boot 85 | /bin/rm -f -v /etc/ssh/ssh_host_*_key* 86 | cp regenerate_ssh_host_keys.service /etc/systemd/system 87 | systemctl enable regenerate_ssh_host_keys 88 | 89 | # hostfile fix 90 | cp create_hosts_file.service /etc/systemd/system 91 | systemctl enable create_hosts_file.service 92 | 93 | # remove .dockerenv file because lx is not a docker 94 | cp remove_dockerenv_file.service /etc/systemd/system 95 | systemctl enable remove_dockerenv_file.service 96 | 97 | # Revert systemd's tcp wrapper for ssh. This really only applies to 24.04, 98 | # but won't cause a failure on earlier versions. 99 | systemctl disable ssh.socket 100 | systemctl enable ssh.service 101 | 102 | # Remove the divert that disables services 103 | rm -f /sbin/initctl 104 | dpkg-divert --local --rename --remove /sbin/initctl 105 | 106 | # add dtrace tools 107 | curl -sSLO https://mirrors.omnios.org/lx/dtracetools-lx_1.0_amd64.deb 108 | dpkg -i dtracetools-lx_1.0_amd64.deb 109 | rm dtracetools-lx_1.0_amd64.deb 110 | 111 | # some smf helper folders 112 | mkdir -p /var/svc /var/db 113 | -------------------------------------------------------------------------------- /ubuntu/helpers/create_hosts_file.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Create a Hostfile 3 | After=network.target auditd.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/mv /etc/hosts.lx /etc/hosts 8 | ExecStart=/bin/sed -i s/HOSTNAME/%H/g /etc/hosts 9 | ExecStartPost=/bin/systemctl disable create_hosts_file.service 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | # last line 14 | -------------------------------------------------------------------------------- /ubuntu/helpers/hosts: -------------------------------------------------------------------------------- 1 | # host file 2 | 127.0.0.1 localhost 3 | 127.0.1.1 HOSTNAME 4 | # The following lines are desirable for IPv6 capable hosts 5 | ::1 localhost ip6-localhost ip6-loopback 6 | ff02::1 ip6-allnodes 7 | ff02::2 ip6-allrouters 8 | # end 9 | -------------------------------------------------------------------------------- /ubuntu/helpers/locale: -------------------------------------------------------------------------------- 1 | LANG=en_US.UTF8 2 | -------------------------------------------------------------------------------- /ubuntu/helpers/locale.conf: -------------------------------------------------------------------------------- 1 | LANG=en_US.UTF8 2 | -------------------------------------------------------------------------------- /ubuntu/helpers/locale.gen: -------------------------------------------------------------------------------- 1 | # This file lists locales that you wish to have built. You can find a list 2 | # of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add 3 | # user defined locales to /usr/local/share/i18n/SUPPORTED. If you change 4 | # this file, you need to rerun locale-gen. 5 | 6 | 7 | # aa_DJ ISO-8859-1 8 | # aa_DJ.UTF-8 UTF-8 9 | # aa_ER UTF-8 10 | # aa_ER@saaho UTF-8 11 | # aa_ET UTF-8 12 | # af_ZA ISO-8859-1 13 | # af_ZA.UTF-8 UTF-8 14 | # ak_GH UTF-8 15 | # am_ET UTF-8 16 | # an_ES ISO-8859-15 17 | # an_ES.UTF-8 UTF-8 18 | # anp_IN UTF-8 19 | # ar_AE ISO-8859-6 20 | # ar_AE.UTF-8 UTF-8 21 | # ar_BH ISO-8859-6 22 | # ar_BH.UTF-8 UTF-8 23 | # ar_DZ ISO-8859-6 24 | # ar_DZ.UTF-8 UTF-8 25 | # ar_EG ISO-8859-6 26 | # ar_EG.UTF-8 UTF-8 27 | # ar_IN UTF-8 28 | # ar_IQ ISO-8859-6 29 | # ar_IQ.UTF-8 UTF-8 30 | # ar_JO ISO-8859-6 31 | # ar_JO.UTF-8 UTF-8 32 | # ar_KW ISO-8859-6 33 | # ar_KW.UTF-8 UTF-8 34 | # ar_LB ISO-8859-6 35 | # ar_LB.UTF-8 UTF-8 36 | # ar_LY ISO-8859-6 37 | # ar_LY.UTF-8 UTF-8 38 | # ar_MA ISO-8859-6 39 | # ar_MA.UTF-8 UTF-8 40 | # ar_OM ISO-8859-6 41 | # ar_OM.UTF-8 UTF-8 42 | # ar_QA ISO-8859-6 43 | # ar_QA.UTF-8 UTF-8 44 | # ar_SA ISO-8859-6 45 | # ar_SA.UTF-8 UTF-8 46 | # ar_SD ISO-8859-6 47 | # ar_SD.UTF-8 UTF-8 48 | # ar_SS UTF-8 49 | # ar_SY ISO-8859-6 50 | # ar_SY.UTF-8 UTF-8 51 | # ar_TN ISO-8859-6 52 | # ar_TN.UTF-8 UTF-8 53 | # ar_YE ISO-8859-6 54 | # ar_YE.UTF-8 UTF-8 55 | # as_IN UTF-8 56 | # ast_ES ISO-8859-15 57 | # ast_ES.UTF-8 UTF-8 58 | # ayc_PE UTF-8 59 | # az_AZ UTF-8 60 | # be_BY CP1251 61 | # be_BY.UTF-8 UTF-8 62 | # be_BY@latin UTF-8 63 | # bem_ZM UTF-8 64 | # ber_DZ UTF-8 65 | # ber_MA UTF-8 66 | # bg_BG CP1251 67 | # bg_BG.UTF-8 UTF-8 68 | # bhb_IN.UTF-8 UTF-8 69 | # bho_IN UTF-8 70 | # bn_BD UTF-8 71 | # bn_IN UTF-8 72 | # bo_CN UTF-8 73 | # bo_IN UTF-8 74 | # br_FR ISO-8859-1 75 | # br_FR.UTF-8 UTF-8 76 | # br_FR@euro ISO-8859-15 77 | # brx_IN UTF-8 78 | # bs_BA ISO-8859-2 79 | # bs_BA.UTF-8 UTF-8 80 | # byn_ER UTF-8 81 | # ca_AD ISO-8859-15 82 | # ca_AD.UTF-8 UTF-8 83 | # ca_ES ISO-8859-1 84 | # ca_ES.UTF-8 UTF-8 85 | # ca_ES.UTF-8@valencia UTF-8 86 | # ca_ES@euro ISO-8859-15 87 | # ca_ES@valencia ISO-8859-15 88 | # ca_FR ISO-8859-15 89 | # ca_FR.UTF-8 UTF-8 90 | # ca_IT ISO-8859-15 91 | # ca_IT.UTF-8 UTF-8 92 | # ce_RU UTF-8 93 | # ckb_IQ UTF-8 94 | # cmn_TW UTF-8 95 | # crh_UA UTF-8 96 | # cs_CZ ISO-8859-2 97 | # cs_CZ.UTF-8 UTF-8 98 | # csb_PL UTF-8 99 | # cv_RU UTF-8 100 | # cy_GB ISO-8859-14 101 | # cy_GB.UTF-8 UTF-8 102 | # da_DK ISO-8859-1 103 | # da_DK.UTF-8 UTF-8 104 | # de_AT ISO-8859-1 105 | # de_AT.UTF-8 UTF-8 106 | # de_AT@euro ISO-8859-15 107 | # de_BE ISO-8859-1 108 | # de_BE.UTF-8 UTF-8 109 | # de_BE@euro ISO-8859-15 110 | # de_CH ISO-8859-1 111 | # de_CH.UTF-8 UTF-8 112 | # de_DE ISO-8859-1 113 | # de_DE.UTF-8 UTF-8 114 | # de_DE@euro ISO-8859-15 115 | # de_LI.UTF-8 UTF-8 116 | # de_LU ISO-8859-1 117 | # de_LU.UTF-8 UTF-8 118 | # de_LU@euro ISO-8859-15 119 | # doi_IN UTF-8 120 | # dv_MV UTF-8 121 | # dz_BT UTF-8 122 | # el_CY ISO-8859-7 123 | # el_CY.UTF-8 UTF-8 124 | # el_GR ISO-8859-7 125 | # el_GR.UTF-8 UTF-8 126 | # en_AG UTF-8 127 | # en_AU ISO-8859-1 128 | # en_AU.UTF-8 UTF-8 129 | # en_BW ISO-8859-1 130 | # en_BW.UTF-8 UTF-8 131 | # en_CA ISO-8859-1 132 | # en_CA.UTF-8 UTF-8 133 | # en_DK ISO-8859-1 134 | # en_DK.ISO-8859-15 ISO-8859-15 135 | # en_DK.UTF-8 UTF-8 136 | # en_GB ISO-8859-1 137 | # en_GB.ISO-8859-15 ISO-8859-15 138 | # en_GB.UTF-8 UTF-8 139 | # en_HK ISO-8859-1 140 | # en_HK.UTF-8 UTF-8 141 | # en_IE ISO-8859-1 142 | # en_IE.UTF-8 UTF-8 143 | # en_IE@euro ISO-8859-15 144 | # en_IN UTF-8 145 | # en_NG UTF-8 146 | # en_NZ ISO-8859-1 147 | # en_NZ.UTF-8 UTF-8 148 | # en_PH ISO-8859-1 149 | # en_PH.UTF-8 UTF-8 150 | # en_SG ISO-8859-1 151 | # en_SG.UTF-8 UTF-8 152 | # en_US ISO-8859-1 153 | # en_US.ISO-8859-15 ISO-8859-15 154 | en_US.UTF-8 UTF-8 155 | # en_ZA ISO-8859-1 156 | # en_ZA.UTF-8 UTF-8 157 | # en_ZM UTF-8 158 | # en_ZW ISO-8859-1 159 | # en_ZW.UTF-8 UTF-8 160 | # eo ISO-8859-3 161 | # eo.UTF-8 UTF-8 162 | # eo_US.UTF-8 UTF-8 163 | # es_AR ISO-8859-1 164 | # es_AR.UTF-8 UTF-8 165 | # es_BO ISO-8859-1 166 | # es_BO.UTF-8 UTF-8 167 | # es_CL ISO-8859-1 168 | # es_CL.UTF-8 UTF-8 169 | # es_CO ISO-8859-1 170 | # es_CO.UTF-8 UTF-8 171 | # es_CR ISO-8859-1 172 | # es_CR.UTF-8 UTF-8 173 | # es_CU UTF-8 174 | # es_DO ISO-8859-1 175 | # es_DO.UTF-8 UTF-8 176 | # es_EC ISO-8859-1 177 | # es_EC.UTF-8 UTF-8 178 | # es_ES ISO-8859-1 179 | # es_ES.UTF-8 UTF-8 180 | # es_ES@euro ISO-8859-15 181 | # es_GT ISO-8859-1 182 | # es_GT.UTF-8 UTF-8 183 | # es_HN ISO-8859-1 184 | # es_HN.UTF-8 UTF-8 185 | # es_MX ISO-8859-1 186 | # es_MX.UTF-8 UTF-8 187 | # es_NI ISO-8859-1 188 | # es_NI.UTF-8 UTF-8 189 | # es_PA ISO-8859-1 190 | # es_PA.UTF-8 UTF-8 191 | # es_PE ISO-8859-1 192 | # es_PE.UTF-8 UTF-8 193 | # es_PR ISO-8859-1 194 | # es_PR.UTF-8 UTF-8 195 | # es_PY ISO-8859-1 196 | # es_PY.UTF-8 UTF-8 197 | # es_SV ISO-8859-1 198 | # es_SV.UTF-8 UTF-8 199 | # es_US ISO-8859-1 200 | # es_US.UTF-8 UTF-8 201 | # es_UY ISO-8859-1 202 | # es_UY.UTF-8 UTF-8 203 | # es_VE ISO-8859-1 204 | # es_VE.UTF-8 UTF-8 205 | # et_EE ISO-8859-1 206 | # et_EE.ISO-8859-15 ISO-8859-15 207 | # et_EE.UTF-8 UTF-8 208 | # eu_ES ISO-8859-1 209 | # eu_ES.UTF-8 UTF-8 210 | # eu_ES@euro ISO-8859-15 211 | # eu_FR ISO-8859-1 212 | # eu_FR.UTF-8 UTF-8 213 | # eu_FR@euro ISO-8859-15 214 | # fa_IR UTF-8 215 | # ff_SN UTF-8 216 | # fi_FI ISO-8859-1 217 | # fi_FI.UTF-8 UTF-8 218 | # fi_FI@euro ISO-8859-15 219 | # fil_PH UTF-8 220 | # fo_FO ISO-8859-1 221 | # fo_FO.UTF-8 UTF-8 222 | # fr_BE ISO-8859-1 223 | # fr_BE.UTF-8 UTF-8 224 | # fr_BE@euro ISO-8859-15 225 | # fr_CA ISO-8859-1 226 | # fr_CA.UTF-8 UTF-8 227 | # fr_CH ISO-8859-1 228 | # fr_CH.UTF-8 UTF-8 229 | # fr_FR ISO-8859-1 230 | # fr_FR.UTF-8 UTF-8 231 | # fr_FR@euro ISO-8859-15 232 | # fr_LU ISO-8859-1 233 | # fr_LU.UTF-8 UTF-8 234 | # fr_LU@euro ISO-8859-15 235 | # fur_IT UTF-8 236 | # fy_DE UTF-8 237 | # fy_NL UTF-8 238 | # ga_IE ISO-8859-1 239 | # ga_IE.UTF-8 UTF-8 240 | # ga_IE@euro ISO-8859-15 241 | # gd_GB ISO-8859-15 242 | # gd_GB.UTF-8 UTF-8 243 | # gez_ER UTF-8 244 | # gez_ER@abegede UTF-8 245 | # gez_ET UTF-8 246 | # gez_ET@abegede UTF-8 247 | # gl_ES ISO-8859-1 248 | # gl_ES.UTF-8 UTF-8 249 | # gl_ES@euro ISO-8859-15 250 | # gu_IN UTF-8 251 | # gv_GB ISO-8859-1 252 | # gv_GB.UTF-8 UTF-8 253 | # ha_NG UTF-8 254 | # hak_TW UTF-8 255 | # he_IL ISO-8859-8 256 | # he_IL.UTF-8 UTF-8 257 | # hi_IN UTF-8 258 | # hne_IN UTF-8 259 | # hr_HR ISO-8859-2 260 | # hr_HR.UTF-8 UTF-8 261 | # hsb_DE ISO-8859-2 262 | # hsb_DE.UTF-8 UTF-8 263 | # ht_HT UTF-8 264 | # hu_HU ISO-8859-2 265 | # hu_HU.UTF-8 UTF-8 266 | # hy_AM UTF-8 267 | # hy_AM.ARMSCII-8 ARMSCII-8 268 | # ia_FR UTF-8 269 | # id_ID ISO-8859-1 270 | # id_ID.UTF-8 UTF-8 271 | # ig_NG UTF-8 272 | # ik_CA UTF-8 273 | # is_IS ISO-8859-1 274 | # is_IS.UTF-8 UTF-8 275 | # it_CH ISO-8859-1 276 | # it_CH.UTF-8 UTF-8 277 | # it_IT ISO-8859-1 278 | # it_IT.UTF-8 UTF-8 279 | # it_IT@euro ISO-8859-15 280 | # iu_CA UTF-8 281 | # iw_IL ISO-8859-8 282 | # iw_IL.UTF-8 UTF-8 283 | # ja_JP.EUC-JP EUC-JP 284 | # ja_JP.UTF-8 UTF-8 285 | # ka_GE GEORGIAN-PS 286 | # ka_GE.UTF-8 UTF-8 287 | # kk_KZ PT154 288 | # kk_KZ RK1048 289 | # kk_KZ.UTF-8 UTF-8 290 | # kl_GL ISO-8859-1 291 | # kl_GL.UTF-8 UTF-8 292 | # km_KH UTF-8 293 | # kn_IN UTF-8 294 | # ko_KR.EUC-KR EUC-KR 295 | # ko_KR.UTF-8 UTF-8 296 | # kok_IN UTF-8 297 | # ks_IN UTF-8 298 | # ks_IN@devanagari UTF-8 299 | # ku_TR ISO-8859-9 300 | # ku_TR.UTF-8 UTF-8 301 | # kw_GB ISO-8859-1 302 | # kw_GB.UTF-8 UTF-8 303 | # ky_KG UTF-8 304 | # lb_LU UTF-8 305 | # lg_UG ISO-8859-10 306 | # lg_UG.UTF-8 UTF-8 307 | # li_BE UTF-8 308 | # li_NL UTF-8 309 | # lij_IT UTF-8 310 | # ln_CD UTF-8 311 | # lo_LA UTF-8 312 | # lt_LT ISO-8859-13 313 | # lt_LT.UTF-8 UTF-8 314 | # lv_LV ISO-8859-13 315 | # lv_LV.UTF-8 UTF-8 316 | # lzh_TW UTF-8 317 | # mag_IN UTF-8 318 | # mai_IN UTF-8 319 | # mg_MG ISO-8859-15 320 | # mg_MG.UTF-8 UTF-8 321 | # mhr_RU UTF-8 322 | # mi_NZ ISO-8859-13 323 | # mi_NZ.UTF-8 UTF-8 324 | # mk_MK ISO-8859-5 325 | # mk_MK.UTF-8 UTF-8 326 | # ml_IN UTF-8 327 | # mn_MN UTF-8 328 | # mni_IN UTF-8 329 | # mr_IN UTF-8 330 | # ms_MY ISO-8859-1 331 | # ms_MY.UTF-8 UTF-8 332 | # mt_MT ISO-8859-3 333 | # mt_MT.UTF-8 UTF-8 334 | # my_MM UTF-8 335 | # nan_TW UTF-8 336 | # nan_TW@latin UTF-8 337 | # nb_NO ISO-8859-1 338 | # nb_NO.UTF-8 UTF-8 339 | # nds_DE UTF-8 340 | # nds_NL UTF-8 341 | # ne_NP UTF-8 342 | # nhn_MX UTF-8 343 | # niu_NU UTF-8 344 | # niu_NZ UTF-8 345 | # nl_AW UTF-8 346 | # nl_BE ISO-8859-1 347 | # nl_BE.UTF-8 UTF-8 348 | # nl_BE@euro ISO-8859-15 349 | # nl_NL ISO-8859-1 350 | # nl_NL.UTF-8 UTF-8 351 | # nl_NL@euro ISO-8859-15 352 | # nn_NO ISO-8859-1 353 | # nn_NO.UTF-8 UTF-8 354 | # nr_ZA UTF-8 355 | # nso_ZA UTF-8 356 | # oc_FR ISO-8859-1 357 | # oc_FR.UTF-8 UTF-8 358 | # om_ET UTF-8 359 | # om_KE ISO-8859-1 360 | # om_KE.UTF-8 UTF-8 361 | # or_IN UTF-8 362 | # os_RU UTF-8 363 | # pa_IN UTF-8 364 | # pa_PK UTF-8 365 | # pap_AN UTF-8 366 | # pap_AW UTF-8 367 | # pap_CW UTF-8 368 | # pl_PL ISO-8859-2 369 | # pl_PL.UTF-8 UTF-8 370 | # ps_AF UTF-8 371 | # pt_BR ISO-8859-1 372 | # pt_BR.UTF-8 UTF-8 373 | # pt_PT ISO-8859-1 374 | # pt_PT.UTF-8 UTF-8 375 | # pt_PT@euro ISO-8859-15 376 | # quz_PE UTF-8 377 | # raj_IN UTF-8 378 | # ro_RO ISO-8859-2 379 | # ro_RO.UTF-8 UTF-8 380 | # ru_RU ISO-8859-5 381 | # ru_RU.CP1251 CP1251 382 | # ru_RU.KOI8-R KOI8-R 383 | # ru_RU.UTF-8 UTF-8 384 | # ru_UA KOI8-U 385 | # ru_UA.UTF-8 UTF-8 386 | # rw_RW UTF-8 387 | # sa_IN UTF-8 388 | # sat_IN UTF-8 389 | # sc_IT UTF-8 390 | # sd_IN UTF-8 391 | # sd_IN@devanagari UTF-8 392 | # sd_PK UTF-8 393 | # se_NO UTF-8 394 | # shs_CA UTF-8 395 | # si_LK UTF-8 396 | # sid_ET UTF-8 397 | # sk_SK ISO-8859-2 398 | # sk_SK.UTF-8 UTF-8 399 | # sl_SI ISO-8859-2 400 | # sl_SI.UTF-8 UTF-8 401 | # so_DJ ISO-8859-1 402 | # so_DJ.UTF-8 UTF-8 403 | # so_ET UTF-8 404 | # so_KE ISO-8859-1 405 | # so_KE.UTF-8 UTF-8 406 | # so_SO ISO-8859-1 407 | # so_SO.UTF-8 UTF-8 408 | # sq_AL ISO-8859-1 409 | # sq_AL.UTF-8 UTF-8 410 | # sq_MK UTF-8 411 | # sr_ME UTF-8 412 | # sr_RS UTF-8 413 | # sr_RS@latin UTF-8 414 | # ss_ZA UTF-8 415 | # st_ZA ISO-8859-1 416 | # st_ZA.UTF-8 UTF-8 417 | # sv_FI ISO-8859-1 418 | # sv_FI.UTF-8 UTF-8 419 | # sv_FI@euro ISO-8859-15 420 | # sv_SE ISO-8859-1 421 | # sv_SE.ISO-8859-15 ISO-8859-15 422 | # sv_SE.UTF-8 UTF-8 423 | # sw_KE UTF-8 424 | # sw_TZ UTF-8 425 | # szl_PL UTF-8 426 | # ta_IN UTF-8 427 | # ta_LK UTF-8 428 | # tcy_IN.UTF-8 UTF-8 429 | # te_IN UTF-8 430 | # tg_TJ KOI8-T 431 | # tg_TJ.UTF-8 UTF-8 432 | # th_TH TIS-620 433 | # th_TH.UTF-8 UTF-8 434 | # the_NP UTF-8 435 | # ti_ER UTF-8 436 | # ti_ET UTF-8 437 | # tig_ER UTF-8 438 | # tk_TM UTF-8 439 | # tl_PH ISO-8859-1 440 | # tl_PH.UTF-8 UTF-8 441 | # tn_ZA UTF-8 442 | # tr_CY ISO-8859-9 443 | # tr_CY.UTF-8 UTF-8 444 | # tr_TR ISO-8859-9 445 | # tr_TR.UTF-8 UTF-8 446 | # ts_ZA UTF-8 447 | # tt_RU UTF-8 448 | # tt_RU@iqtelif UTF-8 449 | # ug_CN UTF-8 450 | # ug_CN@latin UTF-8 451 | # uk_UA KOI8-U 452 | # uk_UA.UTF-8 UTF-8 453 | # unm_US UTF-8 454 | # ur_IN UTF-8 455 | # ur_PK UTF-8 456 | # uz_UZ ISO-8859-1 457 | # uz_UZ.UTF-8 UTF-8 458 | # uz_UZ@cyrillic UTF-8 459 | # ve_ZA UTF-8 460 | # vi_VN UTF-8 461 | # wa_BE ISO-8859-1 462 | # wa_BE.UTF-8 UTF-8 463 | # wa_BE@euro ISO-8859-15 464 | # wae_CH UTF-8 465 | # wal_ET UTF-8 466 | # wo_SN UTF-8 467 | # xh_ZA ISO-8859-1 468 | # xh_ZA.UTF-8 UTF-8 469 | # yi_US CP1255 470 | # yi_US.UTF-8 UTF-8 471 | # yo_NG UTF-8 472 | # yue_HK UTF-8 473 | # zh_CN GB2312 474 | # zh_CN.GB18030 GB18030 475 | # zh_CN.GBK GBK 476 | # zh_CN.UTF-8 UTF-8 477 | # zh_HK BIG5-HKSCS 478 | # zh_HK.UTF-8 UTF-8 479 | # zh_SG GB2312 480 | # zh_SG.GBK GBK 481 | # zh_SG.UTF-8 UTF-8 482 | # zh_TW BIG5 483 | # zh_TW.EUC-TW EUC-TW 484 | # zh_TW.UTF-8 UTF-8 485 | # zu_ZA ISO-8859-1 486 | # zu_ZA.UTF-8 UTF-8 487 | -------------------------------------------------------------------------------- /ubuntu/helpers/makedev: -------------------------------------------------------------------------------- 1 | Package: makedev 2 | Pin: release * 3 | Pin-Priority: -1 4 | -------------------------------------------------------------------------------- /ubuntu/helpers/override.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | PrivateTmp=no 3 | PrivateDevices=no 4 | PrivateNetwork=no 5 | ProtectSystem=no 6 | NoNewPrivileges=no 7 | ProtectHome=no 8 | -------------------------------------------------------------------------------- /ubuntu/helpers/override22.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | PrivateTmp=no 3 | PrivateDevices=no 4 | PrivateNetwork=no 5 | ProtectSystem=no 6 | NoNewPrivileges=no 7 | ProtectHome=no 8 | LoadCredential= 9 | -------------------------------------------------------------------------------- /ubuntu/helpers/regenerate_ssh_host_keys.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Regenerate SSH host keys 3 | Before=ssh.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/usr/bin/ssh-keygen -A -v 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | # last line 12 | -------------------------------------------------------------------------------- /ubuntu/helpers/remove_dockerenv_file.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Remove dockerenv file 3 | After=network.target auditd.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/rm -f /.dockerenv 8 | ExecStartPost=/bin/systemctl disable remove_dockerenv_file.service 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | # last line 13 | -------------------------------------------------------------------------------- /void/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/void-linux/void-glibc-full 2 | COPY helpers /helpers 3 | RUN cd /helpers && sh build.sh && cd / && rm -rf helpers 4 | -------------------------------------------------------------------------------- /void/helpers/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | touch /etc/void-release 4 | 5 | cat << EOM >> /etc/rc.conf 6 | 7 | # Let runit know we're virtualised 8 | export VIRTUALIZATION=1 9 | 10 | EOM 11 | 12 | sed -i ' 13 | /^#HOSTNAME=/c\ 14 | HOSTNAME=lx 15 | /^#TIMEZONE=/c\ 16 | TIMEZONE="UTC" 17 | ' /etc/rc.conf 18 | 19 | # Disable sysctl changes (reduces console noise on boot) 20 | sed -i 's/^[a-z]/#&/' /usr/lib/sysctl.d/10-void.conf 21 | 22 | # Update the package manager 23 | xbps-install -ySu xbps 24 | # Update all packages 25 | xbps-install -ySu 26 | # Install extras 27 | xbps-install -ySu \ 28 | iproute2 iputils net-tools \ 29 | vpm vsv \ 30 | ncurses-base \ 31 | openssh joe vim \ 32 | rsyslog \ 33 | jq \ 34 | bash 35 | 36 | xbps-alternatives -g vi -s vim-common 37 | 38 | # Clean up cache and remove orphans 39 | xbps-remove -yOo 40 | 41 | svdir=/etc/runit/runsvdir/default 42 | 43 | # Disable default agetty services 44 | rm -f $svdir/agetty-tty* 45 | 46 | # Enable serial console and ssh 47 | ln -s /etc/sv/agetty-console $svdir/ 48 | ln -s /etc/sv/sshd $svdir/ 49 | --------------------------------------------------------------------------------