filebrowser/Dockerfile

23 lines
537 B
Docker
Raw Normal View History

2023-07-13 02:23:29 +00:00
FROM node:slim as nbuild
2023-06-13 02:32:30 +00:00
WORKDIR /app
2023-07-13 02:23:29 +00:00
COPY ./src/frontend/package*.json ./
2023-06-13 02:32:30 +00:00
RUN npm i
2023-07-13 02:23:29 +00:00
COPY ./src/frontend/ ./
2023-06-13 02:32:30 +00:00
RUN npm run build
FROM golang:alpine as base
WORKDIR /app
COPY ./src/backend ./
2023-06-16 17:29:43 +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 \
2023-06-16 17:29:43 +00:00
mailcap
VOLUME /srv
EXPOSE 80
2023-06-18 15:04:31 +00:00
WORKDIR /
COPY --from=base /app/.filebrowser.json /.filebrowser.json
COPY --from=base /app/filebrowser /filebrowser
COPY --from=nbuild /app/dist/ /frontend/dist/
2023-06-15 01:08:09 +00:00
ENTRYPOINT [ "./filebrowser" ]