refactor(docker): install binary in standard path
This commit is contained in:
parent
55422ed48a
commit
2d1eacfab7
@ -83,26 +83,24 @@ RUN useradd -m -s /bin/bash app
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy pre-built binary from host
|
# Install the pre-built binary in the standard executable path.
|
||||||
COPY target/release/picobot /app/picobot
|
COPY target/release/picobot /usr/local/bin/picobot
|
||||||
|
|
||||||
# Copy config template
|
# Copy config template
|
||||||
COPY resources/templates/config.example.json /app/config.json.example
|
COPY resources/templates/config.example.json /app/config.json.example
|
||||||
|
|
||||||
# Create required directories
|
# Create required directories
|
||||||
RUN mkdir -p /app/.picobot/workspace /app/.picobot/media /app/.picobot/tmp && \
|
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
|
chown -R app:app /app
|
||||||
|
|
||||||
USER app
|
USER app
|
||||||
ENV HOME=/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
|
# Environment variables for Chromium in containers
|
||||||
ENV CHROME_BIN=/usr/bin/chromium
|
ENV CHROME_BIN=/usr/bin/chromium
|
||||||
ENV TMPDIR=/app/.picobot/tmp
|
ENV TMPDIR=/app/.picobot/tmp
|
||||||
|
|
||||||
ENTRYPOINT ["/app/picobot"]
|
ENTRYPOINT ["/usr/local/bin/picobot"]
|
||||||
CMD ["gateway"]
|
CMD ["gateway"]
|
||||||
|
|
||||||
EXPOSE 19876
|
EXPOSE 19876
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user