Skip to content

Commit 6bd28fd

Browse files
idvoretskyiCopilot
andauthored
Refactor/repo refresh (#21)
* Refactor Dockerfile to remove package upgrade during build and update README for clarity and structure Signed-off-by: Ihor Dvoretskyi <ihor@linux.com> * Reformat Dockerfile for improved readability of package installation Signed-off-by: Ihor Dvoretskyi <ihor@linux.com> * Add newline for improved readability in README.md Signed-off-by: Ihor Dvoretskyi <ihor@linux.com> * Update .devcontainer/Dockerfile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Ihor Dvoretskyi <ihor@linux.com> --------- Signed-off-by: Ihor Dvoretskyi <ihor@linux.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 401f830 commit 6bd28fd

3 files changed

Lines changed: 50 additions & 33 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
22

33
# hadolint ignore=DL3008
44
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
5-
&& apt-get -y upgrade --no-install-recommends \
65
&& apt-get -y install --no-install-recommends \
7-
curl \
8-
wget \
9-
jq \
10-
build-essential \
11-
python3 \
12-
python3-venv \
13-
python3-pip \
14-
&& apt-get clean -y \
6+
curl \
7+
wget \
8+
jq \
9+
build-essential \
10+
python3 \
11+
python3-venv \
12+
python3-pip \
13+
&& apt-get clean \
1514
&& rm -rf /var/lib/apt/lists/*
1615

1716
RUN mkdir -p /home/vscode/.ssh \

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 Ihor Dvoretskyi
3+
Copyright (c) 2026 Ihor Dvoretskyi
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,76 @@
11
# Development Environment Repository
22

33
[![CI](https://github.com/idvoretskyi/dev/actions/workflows/ci.yml/badge.svg)](https://github.com/idvoretskyi/dev/actions/workflows/ci.yml)
4+
45
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/idvoretskyi/dev)
56

6-
This repository serves as an optimized GitHub Codespaces template for general development workflows.
7+
This repository provides a lean development container template for GitHub
8+
Codespaces and local VS Code Dev Containers.
79

810
## Features
911

10-
- Base image: Ubuntu 24.04
11-
- Essential development tools:
12-
- Python 3.12 with pip
13-
- Node.js LTS with npm
14-
- Git (OS-provided)
12+
- Ubuntu 24.04 base image
13+
- Single-image devcontainer build based on `.devcontainer/Dockerfile`
14+
- Core tooling for general development work:
15+
- Python 3 with `venv` and `pip`
16+
- Node.js LTS with `npm`
1517
- Docker-in-Docker with Docker Compose v2
1618
- GitHub CLI
17-
- Claude Code CLI
18-
- Zsh with common utilities
19-
- Build essentials (gcc, make, etc.)
19+
- Claude Code CLI installed in `postCreateCommand`
20+
- Zsh and common shell utilities
21+
- Build essentials (`gcc`, `make`, and related packages)
22+
- SSH daemon support via the devcontainer feature
2023
- VS Code extensions:
21-
- Claude Dev (Anthropic)
22-
- Python language support
23-
- Docker support
24-
- GitHub Copilot
25-
- YAML support
24+
- Anthropic Claude Code
25+
- Python and Pylance
26+
- Docker
27+
- GitHub Copilot and Copilot Chat
28+
- YAML
2629

2730
## Performance Optimizations
2831

2932
The devcontainer balances speed with operability:
3033

31-
- Includes essential tools: Python, Node.js, Docker, Git, GitHub CLI, Claude Code CLI
32-
- Disabled package upgrades during build
33-
- Removed heavy features (kubectl, helm, minikube, sshd)
34-
- Uses OS-provided Git for faster builds
35-
- Uses OS-provided Python (precompiled) for faster setup
36-
- Installs Claude Code CLI via npm in postCreateCommand
37-
- Core VS Code extensions only
34+
- Keeps the image focused on core development tooling
35+
- Avoids full package upgrades during image build to reduce rebuild time
36+
- Uses the devcontainer feature set for Node.js, Git, Docker, GitHub CLI, and SSH
37+
- Uses Ubuntu's packaged Python runtime for a faster base setup
38+
- Installs Claude Code CLI in `postCreateCommand` instead of baking it into the image
39+
- Limits editor customizations to a small, broadly useful extension set
3840

39-
Estimated startup time: 2-3 minutes
41+
Estimated startup time: 2-3 minutes, depending on feature downloads and
42+
network speed.
4043

4144
## Usage
4245

4346
### GitHub Codespaces
47+
4448
1. Click "Code" button on the GitHub repository
4549
2. Select "Create codespace on main"
4650
3. Wait for the environment to build
4751

4852
### VS Code Local Dev Containers
53+
4954
1. Clone this repository
5055
2. Open in VS Code
5156
3. Click "Reopen in Container" when prompted
5257

58+
## Repository Structure
59+
60+
- `.devcontainer/devcontainer.json`: main devcontainer definition, features,
61+
VS Code extensions, and post-create validation command
62+
- `.devcontainer/Dockerfile`: minimal image customization for extra packages
63+
- `.github/workflows/ci.yml`: CI checks for Dockerfile linting, secret
64+
scanning, image build, and devcontainer smoke testing
65+
5366
## Using as a Template
5467

5568
### Method 1: GitHub Template
69+
5670
Click "Use this template" button to create a new repository
5771

5872
### Method 2: Copy Configuration
73+
5974
```bash
6075
cp -r .devcontainer /path/to/your/project/
6176
```
@@ -75,7 +90,7 @@ Edit `.devcontainer/devcontainer.json` to add features or tools:
7590
}
7691
```
7792

78-
To add heavy tools like Kubernetes:
93+
To add heavier tooling when you actually need it:
7994

8095
```json
8196
{
@@ -89,6 +104,9 @@ To add heavy tools like Kubernetes:
89104
}
90105
```
91106

107+
If you add new features or packages, keep the CI workflow in sync with any new
108+
tooling expectations you want validated during the container smoke test.
109+
92110
## License
93111

94112
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

0 commit comments

Comments
 (0)