Skip to content

Commit 1f94401

Browse files
committed
new node image variant + build that one from current node-kafka
1 parent d1d2b3c commit 1f94401

File tree

5 files changed

+39
-150
lines changed

5 files changed

+39
-150
lines changed

.github/workflows/images.yaml

+11-150
Original file line numberDiff line numberDiff line change
@@ -49,174 +49,35 @@ jobs:
4949

5050
### build steps below are generated ###
5151
-
52-
name: Build and push headless-chrome latest
52+
name: Build and push node-kafka-watch root
5353
uses: docker/build-push-action@v5
5454
env:
5555
SOURCE_DATE_EPOCH: 0
5656
with:
57-
context: headless-chrome
57+
context: node-kafka-watch
5858
tags: |
59-
ghcr.io/yolean/headless-chrome:latest
60-
ghcr.io/yolean/headless-chrome:${{ github.sha }}
61-
platforms: linux/amd64
62-
push: true
63-
cache-from: type=gha
64-
cache-to: type=gha,mode=max
65-
build-contexts: |
66-
yolean/docker-base=docker-image://ghcr.io/yolean/docker-base
67-
-
68-
name: Build and push git-http-readonly latest
69-
uses: docker/build-push-action@v5
70-
env:
71-
SOURCE_DATE_EPOCH: 0
72-
with:
73-
context: git-http-readonly
74-
tags: |
75-
ghcr.io/yolean/git-http-readonly:latest
76-
ghcr.io/yolean/git-http-readonly:${{ github.sha }}
77-
platforms: linux/amd64,linux/arm64/v8
78-
push: true
79-
cache-from: type=gha
80-
cache-to: type=gha,mode=max
81-
-
82-
name: Build and push runtime-quarkus latest
83-
uses: docker/build-push-action@v5
84-
env:
85-
SOURCE_DATE_EPOCH: 0
86-
with:
87-
context: runtime-quarkus
88-
tags: |
89-
ghcr.io/yolean/runtime-quarkus:latest
90-
ghcr.io/yolean/runtime-quarkus:${{ github.sha }}
91-
platforms: linux/amd64,linux/arm64/v8
92-
push: true
93-
cache-from: type=gha
94-
cache-to: type=gha,mode=max
95-
-
96-
name: Build and push java root
97-
uses: docker/build-push-action@v5
98-
env:
99-
SOURCE_DATE_EPOCH: 0
100-
with:
101-
context: java
102-
tags: |
103-
ghcr.io/yolean/java:root
104-
ghcr.io/yolean/java:${{ github.sha }}-root
105-
platforms: linux/amd64,linux/arm64/v8
106-
push: true
107-
cache-from: type=gha
108-
cache-to: type=gha,mode=max
109-
-
110-
name: Build and push java latest
111-
uses: docker/build-push-action@v5
112-
env:
113-
SOURCE_DATE_EPOCH: 0
114-
with:
115-
context: to-nonroot/java
116-
tags: |
117-
ghcr.io/yolean/java:latest
118-
ghcr.io/yolean/java:${{ github.sha }}
119-
platforms: linux/amd64,linux/arm64/v8
120-
push: true
121-
cache-from: type=gha
122-
cache-to: type=gha,mode=max
123-
build-contexts: |
124-
yolean/java:root=docker-image://ghcr.io/yolean/java:root
125-
-
126-
name: Build and push runtime-quarkus-ubuntu root
127-
uses: docker/build-push-action@v5
128-
env:
129-
SOURCE_DATE_EPOCH: 0
130-
with:
131-
context: runtime-quarkus-ubuntu
132-
tags: |
133-
ghcr.io/yolean/runtime-quarkus-ubuntu:root
134-
ghcr.io/yolean/runtime-quarkus-ubuntu:${{ github.sha }}-root
135-
platforms: linux/amd64,linux/arm64/v8
136-
push: true
137-
cache-from: type=gha
138-
cache-to: type=gha,mode=max
139-
build-contexts: |
140-
yolean/docker-base=docker-image://ghcr.io/yolean/docker-base
141-
-
142-
name: Build and push runtime-quarkus-ubuntu latest
143-
uses: docker/build-push-action@v5
144-
env:
145-
SOURCE_DATE_EPOCH: 0
146-
with:
147-
context: to-nonroot/runtime-quarkus-ubuntu
148-
tags: |
149-
ghcr.io/yolean/runtime-quarkus-ubuntu:latest
150-
ghcr.io/yolean/runtime-quarkus-ubuntu:${{ github.sha }}
151-
platforms: linux/amd64,linux/arm64/v8
152-
push: true
153-
cache-from: type=gha
154-
cache-to: type=gha,mode=max
155-
build-contexts: |
156-
yolean/runtime-quarkus-ubuntu:root=docker-image://ghcr.io/yolean/runtime-quarkus-ubuntu:root
157-
-
158-
name: Build and push runtime-quarkus-ubuntu-jre root
159-
uses: docker/build-push-action@v5
160-
env:
161-
SOURCE_DATE_EPOCH: 0
162-
with:
163-
context: runtime-quarkus-ubuntu-jre
164-
tags: |
165-
ghcr.io/yolean/runtime-quarkus-ubuntu-jre:root
166-
ghcr.io/yolean/runtime-quarkus-ubuntu-jre:${{ github.sha }}-root
167-
platforms: linux/amd64,linux/arm64/v8
168-
push: true
169-
cache-from: type=gha
170-
cache-to: type=gha,mode=max
171-
build-contexts: |
172-
yolean/java:root=docker-image://ghcr.io/yolean/java:root
173-
yolean/runtime-quarkus-ubuntu:root=docker-image://ghcr.io/yolean/runtime-quarkus-ubuntu:root
174-
-
175-
name: Build and push runtime-quarkus-ubuntu-jre latest
176-
uses: docker/build-push-action@v5
177-
env:
178-
SOURCE_DATE_EPOCH: 0
179-
with:
180-
context: to-nonroot/runtime-quarkus-ubuntu-jre
181-
tags: |
182-
ghcr.io/yolean/runtime-quarkus-ubuntu-jre:latest
183-
ghcr.io/yolean/runtime-quarkus-ubuntu-jre:${{ github.sha }}
184-
platforms: linux/amd64,linux/arm64/v8
185-
push: true
186-
cache-from: type=gha
187-
cache-to: type=gha,mode=max
188-
build-contexts: |
189-
yolean/runtime-quarkus-ubuntu-jre:root=docker-image://ghcr.io/yolean/runtime-quarkus-ubuntu-jre:root
190-
-
191-
name: Build and push runtime-quarkus-dev root
192-
uses: docker/build-push-action@v5
193-
env:
194-
SOURCE_DATE_EPOCH: 0
195-
with:
196-
context: runtime-quarkus-dev
197-
tags: |
198-
ghcr.io/yolean/runtime-quarkus-dev:root
199-
ghcr.io/yolean/runtime-quarkus-dev:${{ github.sha }}-root
59+
ghcr.io/yolean/node-kafka-watch:root
60+
ghcr.io/yolean/node-kafka-watch:${{ github.sha }}-root
20061
platforms: linux/amd64,linux/arm64/v8
20162
push: true
20263
cache-from: type=gha
20364
cache-to: type=gha,mode=max
20465
build-contexts: |
205-
yolean/builder-quarkus=docker-image://ghcr.io/yolean/builder-quarkus
206-
yolean/runtime-quarkus-ubuntu:root=docker-image://ghcr.io/yolean/runtime-quarkus-ubuntu:root
66+
yolean/node-watchexec:root=docker-image://ghcr.io/yolean/node-watchexec:root
67+
yolean/node-kafka:root=docker-image://ghcr.io/yolean/node-kafka:root
20768
-
208-
name: Build and push runtime-quarkus-dev latest
69+
name: Build and push node-kafka-watch latest
20970
uses: docker/build-push-action@v5
21071
env:
21172
SOURCE_DATE_EPOCH: 0
21273
with:
213-
context: to-nonroot/runtime-quarkus-dev
74+
context: to-nonroot/node-kafka-watch
21475
tags: |
215-
ghcr.io/yolean/runtime-quarkus-dev:latest
216-
ghcr.io/yolean/runtime-quarkus-dev:${{ github.sha }}
76+
ghcr.io/yolean/node-kafka-watch:latest
77+
ghcr.io/yolean/node-kafka-watch:${{ github.sha }}
21778
platforms: linux/amd64,linux/arm64/v8
21879
push: true
21980
cache-from: type=gha
22081
cache-to: type=gha,mode=max
22182
build-contexts: |
222-
yolean/runtime-quarkus-dev:root=docker-image://ghcr.io/yolean/runtime-quarkus-dev:root
83+
yolean/node-kafka-watch:root=docker-image://ghcr.io/yolean/node-kafka-watch:root

node-kafka-watch/Dockerfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM --platform=$TARGETPLATFORM yolean/node-watchexec:root as watchexec
2+
3+
FROM --platform=$TARGETPLATFORM yolean/node-kafka:root
4+
5+
COPY --from=watchexec --chown=0:0 /usr/local/bin/watchexec /usr/local/bin
6+
7+
WORKDIR /app
8+
9+
COPY --from=watchexec --chown=nonroot:nogroup /app/main.js main.js
10+
11+
ENTRYPOINT [ "/usr/local/bin/watchexec", \
12+
"--print-events", \
13+
"--debounce=500", \
14+
"--shell=none", \
15+
"--watch=/app", \
16+
"-r", \
17+
"--", \
18+
"/usr/local/bin/node" ]
19+
CMD [ "./main.js" ]
File renamed without changes.

test.sh

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ node
3939
node-kafka
4040
node-kafka-cache
4141
node-watchexec
42+
node-kafka-watch
4243
node-gcloud
4344
runtime-quarkus-ubuntu
4445
runtime-quarkus-ubuntu-jre
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM --platform=$TARGETPLATFORM yolean/node-kafka-watch:root
2+
3+
# Appends the same nonroot directives as https://github.com/Yolean/kubernetes-kafka/tree/master/nonroot
4+
# i.e. https://github.com/solsson/dockerfiles/tree/native/kafka-nonroot
5+
RUN grep 'nonroot:x:65532' /etc/passwd || \
6+
echo 'nonroot:x:65532:65534:nonroot:/home/nonroot:/usr/sbin/nologin' >> /etc/passwd && \
7+
mkdir -p /home/nonroot && touch /home/nonroot/.bash_history && chown -R 65532:65534 /home/nonroot
8+
USER nonroot:nogroup

0 commit comments

Comments
 (0)