rust dev container #5

Closed
opened 2024-07-10 21:47:52 +02:00 by djmil · 5 comments
Owner

To compile static githubpage from rust code with trunk tool, it is necessary to:

  • rust alpine dev image (Dockerfile) with all build dependancies
  • publish actual container on a projects packages page or in docker hub
  • test trunk build --release producing dist directory on another machine

Not only this feature introduces dev-containers to the project, enabling almost seamless development across wide range of host machines, it will be also first step towards adding pages functionality to the repo (on top of Gitea-actions).

To compile static `githubpage` from rust code with `trunk` tool, it is necessary to: - [x] rust `alpine` [dev image](https://hub.docker.com/_/rust/) (Dockerfile) with all build dependancies - [x] publish actual container on a projects [packages](https://gitea.djmil.dev/djmil/egui-circles/packages) page or in [docker hub](https://hub.docker.com/repositories/djmil) - [x] test `trunk build --release` producing `dist` directory on another machine Not only this feature introduces `dev-containers` to the project, enabling almost seamless development across wide range of host machines, it will be also first step towards adding `pages` functionality to the repo (on top of Gitea-actions).
djmil added this to the pages milestone 2024-07-10 21:47:52 +02:00
djmil added a new dependency 2024-07-10 21:49:08 +02:00
djmil self-assigned this 2024-07-11 22:39:01 +02:00
Author
Owner

Motivations behind choosing alpine docker image for rust builder:

  • minimal final image size
  • already have descent experience with Debian, so would like to learn a bit more Alpine instead
Motivations behind choosing alpine docker image for rust builder: - minimal final image size - already have descent experience with `Debian`, so would like to learn a bit more `Alpine` instead
Author
Owner

unfortunately, using Alpine as a base for rust dev-container -> leads to compilation errors during cargo dependancy installation

unfortunately, using `Alpine` as a base for `rust` dev-container -> leads to compilation errors during `cargo` dependancy installation
Author
Owner

Due to:

  1. Known Gitea issues with hosting docker registry aka images
  2. Big size (2.5 Gig) of a final builder container

it was decided to publish egui-circles-builder container on Docker Hub

Due to: 1. Known Gitea [issues](https://github.com/go-gitea/gitea/issues/31215) with hosting docker registry aka images 2. Big size (**2.5 Gig**) of a final builder container it was decided to publish [egui-circles-builder](https://hub.docker.com/repository/docker/djmil/egui-circles-builder) container on Docker Hub
Author
Owner

Since i have ARM and AMD64 -based laptops, it make sense to explore Docker images with multi-arch support.

There are two ways to use Docker to build a multiarch image: using docker manifest or using docker buildx.

Since i have ARM and AMD64 -based laptops, it make sense to explore Docker images with [multi-arch](https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/) support. > There are two ways to use Docker to build a multiarch image: using docker **manifest** or using docker **buildx**.
djmil added the
feature
label 2024-08-20 22:25:56 +02:00
djmil removed a dependency 2024-08-30 22:34:12 +02:00
Author
Owner

At the moment, docker dev containers is not the most comfortable way of quickly iterating over code development. Thus this option seems to be more or less useful for quick&easy out of the box build. Any way, at the moment I'm not going to pursue this feature any further. Traditional way of setting up local dev environment seems to be more versatile.

p.s. this feature is still a corner stone for the Gitea Actions implementation.

At the moment, docker dev containers is not the most comfortable way of quickly iterating over code development. Thus this option seems to be more or less useful for quick&easy out of the box build. Any way, at the moment I'm not going to pursue this feature any further. Traditional way of setting up local dev environment seems to be more versatile. p.s. this feature is still a corner stone for the Gitea Actions implementation.
djmil closed this issue 2024-08-31 12:23:28 +02:00
djmil referenced this issue from a commit 2024-08-31 12:23:30 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: djmil/egui-circles#5
No description provided.