Skip to content

Commit d2484c4

Browse files
committed
Merge branch 'infra/windows_build' into feature/auth_page
2 parents 00a24f0 + 778b703 commit d2484c4

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

.dev/builder/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM ubuntu:latest
2+
3+
RUN apt update && apt -y install \
4+
maven \
5+
openjdk-17-jdk
6+
7+
RUN curl https://get.docker.com/ | bash -
8+
RUN curl https://get.pnpm.io/install.sh | bash -
9+
10+
COPY . /build
11+
12+
COPY .dev/builder/docker-entrypoint.sh /usr/local/bin/entrypoint.sh
13+
RUN chmod +x /usr/local/bin/entrypoint.sh
14+
15+
WORKDIR /build
16+
17+
ENTRYPOINT ["entrypoint.sh"]
18+
19+
CMD mvn -DskipTests=true -Pprod clean package

.dev/builder/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Run:
2+
```
3+
docker-compose up --renew-anon-volumes --build && docker-compose down
4+
```
5+
6+
-----
7+
To debug run before:
8+
```
9+
#export BUILDKIT_PROGRESS=plain docker compose build
10+
```

.dev/builder/docker-compose.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: '3.8'
2+
name: "kafbat_builder"
3+
4+
services:
5+
6+
chonky-builder:
7+
container_name: chonky-builder
8+
build:
9+
context: ../..
10+
dockerfile: .dev/builder/Dockerfile
11+
volumes:
12+
- /var/run/docker.sock:/var/run/docker.sock
13+
- ../..:/build
14+
- node_modules:/build/frontend/node_modules/ # Do not alter this as node_modules might not be transferable between OS w/ different arch
15+
- ${HOME}/.m2/repository:/root/.m2/repository # but it's not the case for maven (which also takes ten times longer to dl)
16+
environment:
17+
- DOCKER_HOST=unix:///var/run/docker.sock
18+
# command: mvn -DskipTests=true -Pprod clean package # this is the default command, feel free to override if needed
19+
20+
volumes:
21+
node_modules:

.dev/builder/docker-entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
# The volume is mounted from the host but the contents are intact, need to clean
4+
find /build/frontend/node_modules -mindepth 1 -delete
5+
6+
exec "$@"

0 commit comments

Comments
 (0)