| FROM alpine:3.21 |
|
|
| ARG APP_VERSION=v8.0.5-pro |
|
|
| ENV TZ=Asia/Shanghai |
| ENV APP_BINARY_PATH=/app/app |
| ENV RUNTIME_DIR=/tmp/runtime |
| ENV SUPERVISOR_CONF=/etc/supervisord.conf |
| ENV SUPERVISOR_CONF_TEMPLATE=/etc/supervisord.conf.template |
| ENV STOP_WAIT_SECS=60 |
|
|
| RUN apk add --no-cache ca-certificates curl supervisor tzdata \ |
| && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ |
| && echo $TZ > /etc/timezone |
|
|
| RUN mkdir -p "$(dirname "$APP_BINARY_PATH")" \ |
| && curl -fsSL "https://github.com/Apache-0201/CLIProxyAPI/releases/download/${APP_VERSION}/cli-proxy-api-linux-amd64" -o "$APP_BINARY_PATH" \ |
| && chmod +x "$APP_BINARY_PATH" |
|
|
| COPY entrypoint.sh /usr/local/bin/entrypoint.sh |
| COPY supervisord.conf /etc/supervisord.conf.template |
| RUN chmod +x /usr/local/bin/entrypoint.sh |
|
|
| ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |
|
|