Skip to content

Conversation

@soberpeach
Copy link
Contributor

What does this PR do?

Adds a devcontainer configuration to create a reproducible dev environment.

Motivation

reproducible dev environment

Additional Notes

Try launching in vscode and running it to verify.

@soberpeach soberpeach requested a review from a team as a code owner April 25, 2025 20:34
Comment on lines +18 to +33
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
wget \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
sqlite3 \
libsqlite3-dev \
libssl-dev \
pkg-config \
make \
zsh \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
Copy link

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 bot Apr 25, 2025

Choose a reason for hiding this comment

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

Code Quality Violation

package libsqlite3-dev should have version pinned (...read more)

When using apt-get install, pin the version to avoid unwanted upgrades and undefined behavior.

View in Datadog  Leave us feedback  Documentation

Comment on lines +42 to +49
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
# Add the new user to the sudo group to allow them to run commands with sudo
&& apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(ALL\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
&& rm -rf /var/lib/apt/lists/*

Choose a reason for hiding this comment

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

Code Quality Violation

package sudo should have version pinned (...read more)

When using apt-get install, pin the version to avoid unwanted upgrades and undefined behavior.

View in Datadog  Leave us feedback  Documentation

@gh123man
Copy link
Member

Let's update the readme with some basic steps to use the devcontainer. I did something similar for serilog

@gh123man
Copy link
Member

FYI I get this when I try to use either of the launch targets:
image

@soberpeach soberpeach requested a review from a team as a code owner May 12, 2025 21:06
Copy link
Contributor

@jhgilbert jhgilbert left a comment

Choose a reason for hiding this comment

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

Approved with minor comments, thank you!

soberpeach and others added 6 commits May 12, 2025 17:23
Co-authored-by: Jen Gilbert <j.h.gilbert@gmail.com>
Co-authored-by: Jen Gilbert <j.h.gilbert@gmail.com>
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented May 12, 2025

Datadog Summary

❌ Code Quality    ✅ Code Security    ✅ Dependencies

Next Steps

Fix these code quality issues introduced by this PR:

Notice: docker-best-practices/apt-pin-version
.devcontainer/Dockerfile:18-33

Always pin versions in apt-get install

Notice: docker-best-practices/apt-pin-version
.devcontainer/Dockerfile:42-49

Always pin versions in apt-get install


Was this helpful? Give us feedback!

Comment on lines +18 to +33
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
wget \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
sqlite3 \
libsqlite3-dev \
libssl-dev \
pkg-config \
make \
zsh \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
Copy link

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 bot May 12, 2025

Choose a reason for hiding this comment

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

⚪ Notice: Code Quality Violation

package zsh should have version pinned (...read more)

When using apt-get install, pin the version to avoid unwanted upgrades and undefined behavior.

View in Datadog  Leave us feedback  Documentation

Comment on lines +42 to +49
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
# Add the new user to the sudo group to allow them to run commands with sudo
&& apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(ALL\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
&& rm -rf /var/lib/apt/lists/*
Copy link

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 bot May 12, 2025

Choose a reason for hiding this comment

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

⚪ Notice: Code Quality Violation

package sudo should have version pinned (...read more)

When using apt-get install, pin the version to avoid unwanted upgrades and undefined behavior.

View in Datadog  Leave us feedback  Documentation

@gh123man
Copy link
Member

Container starts!

When I click Debug I get

bundler: command not found: rdebug-ide
Install missing gem executables with `bundle install`

Running bundle install in the shell produces an error.

@ddrthall
Copy link
Contributor

This PR is extended by #76

@ddrthall ddrthall closed this Dec 10, 2025
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.

5 participants