Skip to content

Commit

Permalink
mount directories to persist config
Browse files Browse the repository at this point in the history
  • Loading branch information
scarytom committed Mar 15, 2024
1 parent f4dd9fe commit 383046d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ RUN apt-get update \
&& apt-get install -y ffmpeg libsm6 libxext6 libopengl0 sqlite3 ca-certificates

COPY --from=build /minifox /opt/minifox
WORKDIR /root
ENTRYPOINT ["/opt/minifox/minifox"]

27 changes: 27 additions & 0 deletions launch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh -eu

podman pull docker.io/netmelody/minifoxwq-oci

CONFIG_DIR="${HOME}/.config/minifoxwq"
DOWNLOADS_DIR="${HOME}/Downloads/minifoxwq"

mkdir -p "${CONFIG_DIR}/data"
mkdir -p "${DOWNLOADS_DIR}"
touch "${CONFIG_DIR}/imgui.ini"

podman run --rm -it \
--hostname "$(hostname)" \
--env "DISPLAY=${DISPLAY}" \
--env "PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native" \
--env 'MINIFOXWQ_DATA_DIR=/root/.minifoxdata' \
--device '/dev/snd' \
--volume '/tmp/.X11-unix:/tmp/.X11-unix' \
--volume "${HOME}/.Xauthority:/root/.Xauthority" \
--volume "${XDG_RUNTIME_DIR}/pulse/native:${XDG_RUNTIME_DIR}/pulse/native" \
--volume "${HOME}/.config/pulse/cookie:/root/.config/pulse/cookie" \
--volume "${CONFIG_DIR}/data:/root/.minifoxdata" \
--volume "${CONFIG_DIR}/imgui.ini:/root/imgui.ini" \
--volume "${DOWNLOADS_DIR}:/root/downloads" \
--workdir '/root' \
--publish '3001:3001' \
docker.io/netmelody/minifoxwq-oci

0 comments on commit 383046d

Please sign in to comment.