Dockerfile: carry over local changes

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2025-04-12 09:57:36 -04:00
parent 9895088668
commit e32ca9442d
Signed by: vbatts
GPG key ID: E30EFAA812C6E5ED

View file

@ -1,21 +1,20 @@
# Build Nuxt
FROM node:18-alpine as frontend-builder
FROM r.batts.cloud/nodejs:18 as frontend-builder
WORKDIR /app
RUN npm install -g pnpm
RUN npm install -g pnpm@latest-8
COPY frontend/package.json frontend/pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --shamefully-hoist
COPY frontend .
RUN pnpm build
# Build API
FROM golang:alpine AS builder
FROM r.batts.cloud/golang:1.24 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:trixie
ENV HBOX_MODE=production
ENV HBOX_STORAGE_DATA=/data/
ENV HBOX_STORAGE_SQLITE_URL=/data/homebox.db?_pragma=busy_timeout=2000&_pragma=journal_mode=WAL&_fk=1
RUN apk --no-cache add ca-certificates
RUN mkdir /app
COPY --from=builder /go/bin/api /app