From 92b4c63792be313f226f820362a946de4407b9dd Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Fri, 10 Nov 2023 08:17:54 -0500 Subject: [PATCH] Dockerfile: build on our images Signed-off-by: Vincent Batts --- Dockerfile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 743a439..0e66a10 100644 --- a/Dockerfile +++ b/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