File tree Expand file tree Collapse file tree 4 files changed +56
-0
lines changed Expand file tree Collapse file tree 4 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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+ ```
Original file line number Diff line number Diff line change 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 :
Original file line number Diff line number Diff line change 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 " $@ "
You can’t perform that action at this time.
0 commit comments