Adds a docker image and build task for said image

This commit is contained in:
zontreck 2025-03-15 00:18:27 -07:00
parent 37ba232a54
commit d87c0192ac
6 changed files with 110 additions and 2 deletions

40
Dockerfile Normal file
View file

@ -0,0 +1,40 @@
FROM git.zontreck.com/packages/flutter:latest as BUILDER
WORKDIR /app
COPY ./pubspec.yaml ./
COPY ./cli ./
COPY ./lib ./
COPY ./android ./
COPY ./linux ./
COPY ./ios ./
COPY ./macos ./
COPY ./test ./
COPY ./web ./
COPY ./windows ./
COPY ./analysis_options.yaml ./
RUN dart pub get
RUN dart fix --apply
RUN dart compile exe -o bugvaultd cli/server.dart
FROM git.zontreck.com/packages/flutter:latest
LABEL author Tara Piccari
LABEL email tarapiccari@gmail.com
ENV BUGVAULT_DATA_DIRECTORY /data
COPY --from=BUILDER /app/bugvaultd /sbin/bugvaultd
SHELL ["/bin/bash", "-c"]
COPY ./docker-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
WORKDIR /data
RUN useradd -s /bin/bash -d /data -M bugvault
USER bugvault:bugvault
ENTRYPOINT [ "/entrypoint.sh" ]