filebrowser/Dockerfile

30 lines
635 B
Docker
Raw Normal View History

2023-06-13 02:32:30 +00:00
FROM node:14.21-slim as nbuild
WORKDIR /app
COPY ./src/frontend ./
RUN npm i
RUN npm run build
FROM golang:alpine as base
WORKDIR /app
COPY ./src/backend ./
2023-06-13 13:54:07 +00:00
RUN go build -ldflags='-w -s' -o filebrowser .
2023-06-13 02:32:30 +00:00
FROM alpine:latest
2023-06-13 02:32:30 +00:00
RUN apk --no-cache add \
ca-certificates \
mailcap \
curl
2021-03-21 11:30:48 +00:00
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
CMD curl -f http://localhost/health || exit 1
VOLUME /srv
EXPOSE 80
2023-06-15 01:08:09 +00:00
WORKDIR /app
2023-06-13 02:32:30 +00:00
COPY --from=base /app/docker_config.json /.filebrowser.json
2023-06-15 01:08:09 +00:00
COPY --from=base /app/filebrowser ./filebrowser
COPY --from=nbuild /app/dist/ ./frontend/dist/
2023-06-15 01:08:09 +00:00
ENTRYPOINT [ "./filebrowser" ]