Skip to content

Commit f668e0b

Browse files
committed
Refactor Dockerfile to remove package upgrade during build and update README for clarity and structure
1 parent 401f830 commit f668e0b

3 files changed

Lines changed: 41 additions & 25 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ 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 \
76
curl \
87
wget \

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: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,73 @@
33
[![CI](https://github.com/idvoretskyi/dev/actions/workflows/ci.yml/badge.svg)](https://github.com/idvoretskyi/dev/actions/workflows/ci.yml)
44
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/idvoretskyi/dev)
55

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

89
## Features
910

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)
11+
- Ubuntu 24.04 base image
12+
- Single-image devcontainer build based on `.devcontainer/Dockerfile`
13+
- Core tooling for general development work:
14+
- Python 3 with `venv` and `pip`
15+
- Node.js LTS with `npm`
1516
- Docker-in-Docker with Docker Compose v2
1617
- GitHub CLI
17-
- Claude Code CLI
18-
- Zsh with common utilities
19-
- Build essentials (gcc, make, etc.)
18+
- Claude Code CLI installed in `postCreateCommand`
19+
- Zsh and common shell utilities
20+
- Build essentials (`gcc`, `make`, and related packages)
21+
- SSH daemon support via the devcontainer feature
2022
- VS Code extensions:
21-
- Claude Dev (Anthropic)
22-
- Python language support
23-
- Docker support
24-
- GitHub Copilot
25-
- YAML support
23+
- Anthropic Claude Code
24+
- Python and Pylance
25+
- Docker
26+
- GitHub Copilot and Copilot Chat
27+
- YAML
2628

2729
## Performance Optimizations
2830

2931
The devcontainer balances speed with operability:
3032

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
33+
- Keeps the image focused on core development tooling
34+
- Avoids full package upgrades during image build to reduce rebuild time
35+
- Uses the devcontainer feature set for Node.js, Git, Docker, GitHub CLI, and SSH
36+
- Uses Ubuntu's packaged Python runtime for a faster base setup
37+
- Installs Claude Code CLI in `postCreateCommand` instead of baking it into the image
38+
- Limits editor customizations to a small, broadly useful extension set
3839

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

4143
## Usage
4244

4345
### GitHub Codespaces
46+
4447
1. Click "Code" button on the GitHub repository
4548
2. Select "Create codespace on main"
4649
3. Wait for the environment to build
4750

4851
### VS Code Local Dev Containers
52+
4953
1. Clone this repository
5054
2. Open in VS Code
5155
3. Click "Reopen in Container" when prompted
5256

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

5567
### Method 1: GitHub Template
68+
5669
Click "Use this template" button to create a new repository
5770

5871
### Method 2: Copy Configuration
72+
5973
```bash
6074
cp -r .devcontainer /path/to/your/project/
6175
```
@@ -75,7 +89,7 @@ Edit `.devcontainer/devcontainer.json` to add features or tools:
7589
}
7690
```
7791

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

8094
```json
8195
{
@@ -89,6 +103,9 @@ To add heavy tools like Kubernetes:
89103
}
90104
```
91105

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

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

0 commit comments

Comments
 (0)