Skip to content

Enable to select trixie distribution for docker image#661

Open
Seongook-CHOI-ML wants to merge 2 commits into
miraclelinux:emlinux3from
Seongook-CHOI-ML:emlinux3-docker-enable-to-select-trixie
Open

Enable to select trixie distribution for docker image#661
Seongook-CHOI-ML wants to merge 2 commits into
miraclelinux:emlinux3from
Seongook-CHOI-ML:emlinux3-docker-enable-to-select-trixie

Conversation

@Seongook-CHOI-ML

Copy link
Copy Markdown
Contributor

Purpose

Modified run.sh to enable to select trixie distribution for docker image.

Test

Comfirmed the following:

  • No regression for existing functions
  • Trixie distribution can be selected for docker image

Test results

  1. No regression for existing functions
$ ./run.sh
Image emlinux3-build-test Pulling
...(snip)...
Container docker-emlinux3-build-run-ddc87cde01f6 Created
build@cf8cb309cf77:~/work$ cat /etc/debian_version
12.14
build@cf8cb309cf77:~/work$ exit
$ ./run.sh run
build@48d4ce01d850:~/work$ cat /etc/debian_version
12.14
build@48d4ce01d850:~/work$ exit
$ ./run.sh build
[+] Building 142.7s (27/27) FINISHED
...(snip)...
 ✔ Image emlinux3-build-test Built
$ ./run.sh clean
Untagged: emlinux3-build-test:latest
Deleted: sha256:8bf616a082834ec2f875b18344ee8fd2f1f0d730ff8ce6d0f50a485ee52323ba
  1. Trixie distribution can be selected for docker image
$ ./run.sh -t
Image emlinux3-build-trixie-test Pulling
...(snip)...
Container docker-emlinux3-build-trixie-run-0179d1fd1ab5 Created
build@0cd4b2cb7f37:~/work$ cat /etc/debian_version
13.5
build@0cd4b2cb7f37:~/work$ exit
$ ./run.sh -t run
build@3efaf6770dd3:~/work$ cat /etc/debian_version
13.5
build@3efaf6770dd3:~/work$ exit
$ ./run.sh -t build
[+] Building 151.8s (27/27) FINISHED
...(snip)...
 ✔ Image emlinux3-build-trixie-test Built
$ ./run.sh -t clean
Untagged: emlinux3-build-trixie-test:latest
Deleted: sha256:0ea8fb8281ceed02757bbc174e42d1363976b1027a606de5b327ad8d12df44ec

Signed-off-by: SeongOok CHOI <seongook.choi@miraclelinux.com>
Comment thread docker/docker-compose.yml
user: build
command: /bin/sh -c "sudo mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc && /bin/bash"

emlinux3-build-trixie:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both service have lots of common setting, so please make common setting section using anchors .

e.g.

version: '3.8'

x-build-args: &build-args
  context: .
  args:
    uid: $host_user_id
    http_proxy: $http_proxy
    https_proxy: $https_proxy
    ftp_proxy: $ftp_proxy
    no_proxy: $no_proxy

x-base-config: &base-config
  environment:
    - http_proxy=$http_proxy
    - https_proxy=$https_proxy
    - ftp_proxy=$ftp_proxy
    - no_proxy=$no_proxy
  volumes:
    - /dev/shm:/dev/shm:rw
    - ../../../:/home/build/work:rw
  devices:
    - /dev/net/tun:/dev/net/tun
  privileged: true
  cap_add:
    - NET_ADMIN
  user: build
  command: /bin/sh -c "sudo mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc && /bin/bash"

services:
  emlinux3-build:
    <<: *base-config
    image: "emlinux3-build-${host_user_name}"
    build:
      <<: *build-args
      dockerfile: Dockerfile

  emlinux3-build-trixie:
    <<: *base-config
    image: "emlinux3-build-trixie-${host_user_name}"
    build:
      <<: *build-args
      dockerfile: Dockerfile.trixie

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added new commit for your comment.

Signed-off-by: SeongOok CHOI <seongook.choi@miraclelinux.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants