Skip to content

Commit 6561e0c

Browse files
fix: make it possible split the args passed
1 parent 537b1c3 commit 6561e0c

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ COPY . .
99

1010
RUN CGO_ENABLED=0 go build -o app
1111

12-
FROM scratch
12+
FROM alpine:3.21
13+
14+
RUN apk add --no-cache bash=5.2.37-r0
1315

1416
COPY --from=builder /app/app /usr/local/bin/
1517

16-
ENTRYPOINT ["app"]
18+
COPY ./entrypoint.sh /usr/local/bin/
19+
20+
ENTRYPOINT ["entrypoint.sh"]

entrypoint.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
# Initialize an empty array to hold the arguments
4+
args=()
5+
6+
# Use a while loop to split INPUT_INCLUDES by spaces and handle each token
7+
while IFS= read -r -d ' ' token; do
8+
args+=("$token")
9+
done <<<"$INPUT_INCLUDES "
10+
11+
# Pass the arguments array to your main script
12+
exec app "${args[@]}"

0 commit comments

Comments
 (0)