Skip to content

Add container for local compilation#16

Open
Cowboylaserkittenjetshark wants to merge 2 commits into
mainfrom
docker-dev-local
Open

Add container for local compilation#16
Cowboylaserkittenjetshark wants to merge 2 commits into
mainfrom
docker-dev-local

Conversation

@Cowboylaserkittenjetshark
Copy link
Copy Markdown
Member

Adds a Dockerfile with clang, rust, and opencv installed local development. It is not intended for cross compilation.

Should support the following architectures:

  • 'amd64'
  • 'armhf'
  • 'arm64'
  • 'i386'
  • 'ppc64el'
  • 's390x'
  • 'riscv64'

Comment thread docker/dev/Dockerfile
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.95.0

RUN set -eux; \
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.

why environment variables in image, just pass the environment variables when you run the container? I feel like that stuff is not meant to be done in the docker image.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Disagree

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.

Elaborate

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No

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.

Ok but fr tho, if the image is host architecture dependent that those environment variables should be passed into the container by the host, not set at image build.

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.

Thats how docker selective arch build works

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.

Also dpkg --print-architecture runs in the container when you build the docker image, so you are depending on environment variables already passed to the image at build time.

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.

You lucky the base image is already multi-arch

Comment thread result Outdated
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