feat(docker): install mise in standalone image for language runtime
Build and Deploy / build-and-push (push) Failing after 12s
Build and Deploy / build-and-push (push) Failing after 12s
This commit is contained in:
+17
-3
@@ -18,7 +18,21 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /taskpool .
|
||||
|
||||
# Production stage
|
||||
FROM alpine:3.19
|
||||
RUN apk add --no-cache nginx supervisor
|
||||
|
||||
ENV TZ=Asia/Shanghai \
|
||||
MISE_DATA_DIR=/app/envs/mise \
|
||||
MISE_CONFIG_DIR=/app/envs/mise \
|
||||
MISE_HIDE_UPDATE_WARNING=1 \
|
||||
PATH="/app/envs/mise/shims:/app/envs/mise/bin:/usr/local/bin:/usr/bin:/bin"
|
||||
|
||||
RUN apk add --no-cache \
|
||||
nginx supervisor bash curl wget ca-certificates tzdata git rsync openssh-client \
|
||||
&& cp /usr/share/zoneinfo/${TZ} /etc/localtime \
|
||||
&& echo "${TZ}" > /etc/timezone \
|
||||
&& curl https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh \
|
||||
&& chmod +x /usr/local/bin/mise \
|
||||
&& mkdir -p /app/envs/mise \
|
||||
&& mise --version
|
||||
|
||||
# Copy frontend
|
||||
COPY --from=frontend-builder /app/web/dist /usr/share/nginx/html
|
||||
@@ -35,9 +49,9 @@ COPY docker/start-backend.sh /app/start-backend.sh
|
||||
|
||||
# Create data directories and ship example config (used when no volume config)
|
||||
COPY configs/config.example.ini /app/configs/config.example.ini
|
||||
RUN mkdir -p /app/data /app/configs /app/envs /app/logs \
|
||||
RUN mkdir -p /app/data /app/configs /app/envs /app/logs /app/data/scripts \
|
||||
&& chmod +x /app/taskpool /app/start-backend.sh \
|
||||
&& apk add --no-cache wget ca-certificates
|
||||
&& ln -sf /app/taskpool /usr/local/bin/taskpool
|
||||
|
||||
WORKDIR /app
|
||||
EXPOSE 3000 8052
|
||||
|
||||
Reference in New Issue
Block a user