fix(docker): make browser temp dir mount-safe
This commit is contained in:
parent
2d1eacfab7
commit
711b07af83
@ -89,8 +89,9 @@ 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 persistent application directories. Browser temporary data stays in
|
||||||
RUN mkdir -p /app/.picobot/workspace /app/.picobot/media /app/.picobot/tmp && \
|
# /tmp so bind-mounting /app/.picobot cannot hide its temporary directory.
|
||||||
|
RUN mkdir -p /app/.picobot/workspace /app/.picobot/media && \
|
||||||
chown -R app:app /app
|
chown -R app:app /app
|
||||||
|
|
||||||
USER app
|
USER app
|
||||||
@ -98,7 +99,7 @@ ENV HOME=/app
|
|||||||
|
|
||||||
# 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=/tmp
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/picobot"]
|
ENTRYPOINT ["/usr/local/bin/picobot"]
|
||||||
CMD ["gateway"]
|
CMD ["gateway"]
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
services:
|
services:
|
||||||
picobot:
|
picobot:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
image: picobot:1.2.0
|
image: picobot:1.2.0
|
||||||
container_name: picobot-test
|
container_name: picobot-test
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user