Make data dir a volume

This commit is contained in:
ViViDboarder 2023-06-27 16:24:39 -07:00
parent 50a72348e8
commit 0387b70d3b

View File

@ -1,3 +1,5 @@
# hadolint global ignore=DL3018,DL3059
FROM alpine:3.18 FROM alpine:3.18
RUN apk add --no-cache \ RUN apk add --no-cache \
@ -23,6 +25,7 @@ RUN apk add --no-cache shellcheck rustup || true
RUN adduser -D -h /home/vividboarder -s /bin/bash --ingroup users vividboarder RUN adduser -D -h /home/vividboarder -s /bin/bash --ingroup users vividboarder
USER vividboarder USER vividboarder
# Create home and XDG paths
WORKDIR /home/vividboarder WORKDIR /home/vividboarder
ENV HOME /home/vividboarder ENV HOME /home/vividboarder
ENV XDG_CONFIG_HOME $HOME/.config ENV XDG_CONFIG_HOME $HOME/.config
@ -57,6 +60,7 @@ RUN nvim --headless -c "lua require('plugins.treesitter').bootstrap()" -c quital
# Create persistent data dir # Create persistent data dir
RUN mkdir -p /home/vividboarder/.data RUN mkdir -p /home/vividboarder/.data
VOLUME /home/vividboarder/.data
# Generate workdir # Generate workdir
RUN mkdir /home/vividboarder/data RUN mkdir /home/vividboarder/data