apache / apache/opendal

new feature: devcontainer setup slow

Open
#6,473 2 comments 5 reactions 0 assignees View on GitHub
enhancement releases-note/feat
Dominant language
Rust
Stars
5.4k
Forks
825
Avg merge
1d 14m
Merged PRs (30d)
127

Description

### Feature Description

Devcontainer is supposed to be lightweight, which means it could be easily setup and tear down.
Opendal uses [post create commands](https://github.com/apache/opendal/blob/main/.devcontainer/post_create.sh) to install necessary dependencies.

It leads to a problem, post create commands are executed repeated every time devcontainer restarts.

### Problem and Solution

The better solution is to place heavy-loaded installation into docker file, which in turn leverages docker image cache to avoid re-installation.

### Additional Context

This is my setup at moonlink project:
- dockerfile contains all dependency installation: https://github.com/Mooncake-Labs/moonlink/blob/main/.devcontainer/Dockerfile
- post create setup command only include lightweight commands: https://github.com/Mooncake-Labs/moonlink/blob/main/.devcontainer/setup.sh

### Are you willing to contribute to the development of this feature?

- [ ] Yes, I am willing to contribute to the development of this feature.

Contributor guide

Open the contributing guide

Research direction

Start with .devcontainer/post_create.sh to identify the dependency installation that runs on every restart. Compare the linked Moonlink Dockerfile and setup.sh for the intended split between image-build and post-create work. Done means heavy installation is cached in the Docker image and post-create commands remain lightweight, so restarting the devcontainer does not reinstall dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, dockerfile, shell
Domain
devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.