Skip to content

fix devcontainer failed to start#477

Open
dreamoutbox wants to merge 2 commits intodeadpool-rs:mainfrom
dreamoutbox:fix-devcontainer
Open

fix devcontainer failed to start#477
dreamoutbox wants to merge 2 commits intodeadpool-rs:mainfrom
dreamoutbox:fix-devcontainer

Conversation

@dreamoutbox
Copy link
Copy Markdown
Contributor

Fix the devcontainer failing to start in Codespaces and improve build performance.

Changes:

  • Fix redis-sentinel image tag in docker-compose
  • Move cargo-release and cargo-outdated installation to postCreateCommand
  • Add .dockerignore to avoid unnecessary full Docker rebuilds

Closes #476

redis-sentinel:
# https://hub.docker.com/r/bitnami/redis-sentinel
image: bitnami/redis-sentinel:7.4
image: bitnami/redis-sentinel:latest
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.

Note to maintainer: this is related to bitnami/containers#83267 and using latest is the recommended way.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I know this is recommended but I'm quite unhappy about this practice. That way things randomly break or can be fixed by a container rebuild.

With a pinned version everyone using the devcontainer will run a known good version of the images.

Co-authored-by: Simon Sawert <simon@sawert.se>
Copy link
Copy Markdown
Contributor

@bombsimon bombsimon left a comment

Choose a reason for hiding this comment

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

I'm no maintainer nor collaborator but maybe a review will help ease load of maintainer anyway!

Nice fix! 🎉

@bikeshedder bikeshedder added the T-admin Type: Administrative/Deployment Task label Mar 24, 2026
@bikeshedder
Copy link
Copy Markdown
Collaborator

Awesome. Thanks a lot. I'll look into that shortly. 👍

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I wonder what's the reason for adding this file. The Dockefile doesn't copy anything from the .devcontainer directory anyways so this does nothing.

redis-sentinel:
# https://hub.docker.com/r/bitnami/redis-sentinel
image: bitnami/redis-sentinel:7.4
image: bitnami/redis-sentinel:latest
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I know this is recommended but I'm quite unhappy about this practice. That way things randomly break or can be fixed by a container rebuild.

With a pinned version everyone using the devcontainer will run a known good version of the images.

Comment on lines -21 to -22
RUN /home/vscode/.cargo/bin/cargo install cargo-release
RUN /home/vscode/.cargo/bin/cargo install --locked cargo-outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why move this to the post-create step of the container? I know a lot of people use a quite vanilla container and then add things via features (or post-create scripts) but honestly I never really understood the rationale behind that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-admin Type: Administrative/Deployment Task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Devcontainer fails to start

3 participants