fix: init
This commit is contained in:
parent
09333715a9
commit
40004af0d5
4 changed files with 10 additions and 4 deletions
|
|
@ -30,7 +30,7 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|||
COPY --from=builder /src/build/picoclaw /usr/local/bin/picoclaw
|
||||
|
||||
# Copy container init scripts
|
||||
COPY --chmod=0755 container/* /usr/local/bin/
|
||||
COPY --chmod=0755 container/entrypoint container/init /usr/local/bin/
|
||||
|
||||
# Create non-root user and group
|
||||
RUN addgroup -g 1000 picoclaw && \
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ ARG TARGETPLATFORM
|
|||
RUN apk add --no-cache ca-certificates tzdata
|
||||
|
||||
COPY $TARGETPLATFORM/picoclaw /usr/local/bin/picoclaw
|
||||
COPY --chmod=0755 container/* /usr/local/bin/
|
||||
COPY --chmod=0755 container/entrypoint container/init /usr/local/bin/
|
||||
|
||||
ENTRYPOINT ["entrypoint"]
|
||||
CMD ["gateway"]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
init && picoclaw "$@"
|
||||
if ! init; then
|
||||
echo "Init script failed, aborting" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec picoclaw "$@"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
configs:
|
||||
init_script:
|
||||
file: /path/to/your/init/script
|
||||
file: ./container/init
|
||||
|
||||
services:
|
||||
# ─────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue