Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI pipeline & devcontainer setup #70

Merged
merged 6 commits into from
May 18, 2022
Merged

Conversation

justahero
Copy link
Contributor

@justahero justahero commented May 9, 2022

This PR fixes the Github CI workflow to build the Docker image in .devcontainer/Dockerfile. The Docker image is now built fully, all Rust projects are compiled within the image.

Due to a few restrictions when building a Docker image using Github Actions, the Dockerfile has been updated to avoid issues with USER & WORKDIR instructions.

  • adjust Dockerfile to work on Github CI & as a VS Code devcontainer
  • fix VS Code devcontainer config to set workspace & user
  • update Github CI workflow to build Docker image & compile Rust projects
  • reduce Docker image size, use bullseye-slim base image, remove unnecessary packages
  • update instructions in material

Sebastian Ziebell added 2 commits May 17, 2022 10:44
* split commands to install Rust and use cargo
* install Rust with minimal profile
* use `slim` base image
* remove installation from a few packages
@justahero justahero force-pushed the minimize-docker-image-size branch from b92649e to ef9e504 Compare May 17, 2022 08:44
Sebastian Ziebell added 4 commits May 17, 2022 10:46
Github Actions do not support a shell using TTY, therefore this option
is removed from the shell command.
The `Dockerfile` is built with the default `root` user. This is to
support a successful Docker build on Github CI. Github Actions have a
few restrictions, for example `USER` & `WORKDIR` directives should not
be used.

* refactor Dockerfile, remove `USER` & `WORKDIR` directives
* fix VS Code devcontainer config
  * use `root` user
  * fix workspace folder location
  * update extensions
  * code formating
* adjust Github CI config to build Docker image
* update book instructions on Docker
* remove `bindgen` from Dockerfile
@justahero justahero changed the title Reduce size of Docker image Fix CI pipeline & devcontainer setup May 17, 2022
Copy link
Contributor

@BriocheBerlin BriocheBerlin left a comment

Choose a reason for hiding this comment

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

LGTM 🐝

@justahero justahero merged commit f887d44 into main May 18, 2022
@justahero justahero deleted the minimize-docker-image-size branch May 18, 2022 09:25
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