chore(docker): return to alpine, add dockerignore

Alpine builds are working again.
Apparently, we removed the dependency on the non-working library.
This commit is contained in:
Ivan R. 2024-04-02 18:51:43 +05:00
parent c8f8a7feb4
commit 4104b04f17
Signed by: lumin
GPG key ID: 927D3132247BDE4E
2 changed files with 8 additions and 4 deletions

5
.dockerignore Normal file
View file

@ -0,0 +1,5 @@
*~
*.db
*.bak
*.sqlite3
**/.DS_Store

View file

@ -1,6 +1,6 @@
FROM golang:1.22 AS builder FROM golang:1.22-alpine AS builder
RUN apt install -y --no-install-recommends gcc RUN apk add --no-cache gcc libc-dev
WORKDIR /app WORKDIR /app
@ -11,7 +11,7 @@ ADD . .
RUN go build -o main RUN go build -o main
FROM debian:bookworm-slim FROM alpine:3.19
WORKDIR /app WORKDIR /app
COPY --from=builder /app/main /usr/local/bin/phoenix COPY --from=builder /app/main /usr/local/bin/phoenix
@ -20,7 +20,6 @@ COPY templates ./templates
RUN mkdir /var/lib/phoenix RUN mkdir /var/lib/phoenix
ENV P_DBPATH="/var/lib/phoenix/db.sqlite3" ENV P_DBPATH="/var/lib/phoenix/db.sqlite3"
ENV P_PRODUCTION="true"
EXPOSE 8080 EXPOSE 8080