Skip to content

Commit 23948c9

Browse files
committed
debian containerization for dev
1 parent 75f7670 commit 23948c9

File tree

3 files changed

+26
-16
lines changed

3 files changed

+26
-16
lines changed

Dockerfile.dev

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
FROM debian:buster
2-
3-
RUN echo "deb http://archive.debian.org/debian buster main" > /etc/apt/sources.list && \
4-
echo "deb http://archive.debian.org/debian-security buster/updates main" >> /etc/apt/sources.list && \
5-
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-valid-until
1+
FROM debian:trixie
62

73
RUN apt-get update && apt-get install -y \
84
wget \
@@ -18,6 +14,8 @@ RUN apt-get update && apt-get install -y \
1814
sudo \
1915
lsb-release \
2016
docker.io \
17+
vim \
18+
redis-server \
2119
&& rm -rf /var/lib/apt/lists/*
2220

2321
RUN wget https://dl.google.com/go/go1.13.15.linux-amd64.tar.gz && \
@@ -26,6 +24,6 @@ RUN wget https://dl.google.com/go/go1.13.15.linux-amd64.tar.gz && \
2624

2725
ENV PATH=$PATH:/usr/local/go/bin
2826

29-
WORKDIR /app
27+
WORKDIR ${PROJECT_PATH:-/app}
3028

3129
EXPOSE 8080 8081 8082

HACKING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,22 @@ Ensure that you have:
1313

1414
## Preparation
1515

16+
### Containerized Development (Docker Compose)
17+
18+
Alternatively, you can use the provided `docker-compose.dev.yml` for an isolated, reproducible environment (Debian bookworm by default). This mounts the source tree and the host Docker socket (for nested Docker usage required by the builder pbuilder workflow) and exposes service ports.
19+
20+
Build and start the dev container:
21+
22+
```bash
23+
PROJECT_PATH=$(pwd) docker-compose -f docker-compose.dev.yml up -d --build
24+
```
25+
26+
Enter the container shell and run services:
27+
28+
```bash
29+
docker-compose -f docker-compose.dev.yml exec -it dev bash
30+
```
31+
1632
### GPG Key
1733

1834
You need to have a pair of GPG key in your GPG store. If you don't have one, please create it with `gpg --generate-key`. When generating GPG key for irgsh infrastructure, please do not set any passphrase. Check it by running `gpg --list-key`

docker-compose.dev.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,18 @@ services:
44
context: .
55
dockerfile: Dockerfile.dev
66
volumes:
7-
- .:/app
7+
- .:${PROJECT_PATH:-/app}
88
- /var/run/docker.sock:/var/run/docker.sock
9-
working_dir: /app
10-
command: tail -f /dev/null
11-
depends_on:
12-
- redis
9+
working_dir: ${PROJECT_PATH:-/app}
10+
command: sh -c "service redis-server start && tail -f /dev/null"
1311
environment:
1412
- DEV=1
15-
- IRGSH_CONFIG_PATH=/app/utils/config.docker.yml
13+
- IRGSH_CONFIG_PATH=${PROJECT_PATH:-/app}/utils/config.docker.yml
1614
privileged: true
1715
ports:
1816
- "8080:8080"
1917
- "8081:8081"
2018
- "8082:8082"
2119

22-
redis:
23-
image: redis:latest
24-
ports:
25-
- "6379:6379"
20+
# Don't forget to run vm.overcommit_memory = 1, in host machine
21+
# Temporary fix

0 commit comments

Comments
 (0)