refactor(docker): install binary in standard path

This commit is contained in:
xiaoxixi 2026-07-19 19:34:08 +08:00
parent 55422ed48a
commit 2d1eacfab7

View File

@ -83,26 +83,24 @@ RUN useradd -m -s /bin/bash app
WORKDIR /app
# Copy pre-built binary from host
COPY target/release/picobot /app/picobot
# Install the pre-built binary in the standard executable path.
COPY target/release/picobot /usr/local/bin/picobot
# Copy config template
COPY resources/templates/config.example.json /app/config.json.example
# Create required directories
RUN mkdir -p /app/.picobot/workspace /app/.picobot/media /app/.picobot/tmp && \
ln -sf /app/picobot /usr/local/bin/picobot && \
chown -R app:app /app
USER app
ENV HOME=/app
ENV PATH="/app:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Environment variables for Chromium in containers
ENV CHROME_BIN=/usr/bin/chromium
ENV TMPDIR=/app/.picobot/tmp
ENTRYPOINT ["/app/picobot"]
ENTRYPOINT ["/usr/local/bin/picobot"]
CMD ["gateway"]
EXPOSE 19876