forked from mirrors/homebox
Dockerfile: build on our images
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
0995478cc0
commit
92b4c63792
1 changed files with 5 additions and 7 deletions
12
Dockerfile
12
Dockerfile
|
@ -1,6 +1,6 @@
|
|||
|
||||
# Build Nuxt
|
||||
FROM node:18-alpine as frontend-builder
|
||||
FROM r.batts.cloud/node:18 as frontend-builder
|
||||
WORKDIR /app
|
||||
RUN npm install -g pnpm
|
||||
COPY frontend/package.json frontend/pnpm-lock.yaml ./
|
||||
|
@ -9,13 +9,12 @@ COPY frontend .
|
|||
RUN pnpm build
|
||||
|
||||
# Build API
|
||||
FROM golang:alpine AS builder
|
||||
FROM r.batts.cloud/golang:1.21 AS builder
|
||||
ARG BUILD_TIME
|
||||
ARG COMMIT
|
||||
ARG VERSION
|
||||
RUN apk update && \
|
||||
apk upgrade && \
|
||||
apk add --update git build-base gcc g++
|
||||
RUN apt update && \
|
||||
apt install -y git build-essential gcc g++
|
||||
|
||||
WORKDIR /go/src/app
|
||||
COPY ./backend .
|
||||
|
@ -28,13 +27,12 @@ RUN CGO_ENABLED=0 GOOS=linux go build \
|
|||
-v ./app/api/*.go
|
||||
|
||||
# Production Stage
|
||||
FROM alpine:latest
|
||||
FROM r.batts.cloud/debian:bookworm
|
||||
|
||||
ENV HBOX_MODE=production
|
||||
ENV HBOX_STORAGE_DATA=/data/
|
||||
ENV HBOX_STORAGE_SQLITE_URL=/data/homebox.db?_fk=1
|
||||
|
||||
RUN apk --no-cache add ca-certificates
|
||||
RUN mkdir /app
|
||||
COPY --from=builder /go/bin/api /app
|
||||
|
||||
|
|
Loading…
Reference in a new issue