mirror of https://github.com/glanceapp/glance.git
commit
a80a34afb1
@ -0,0 +1,9 @@
|
|||||||
|
# https://docs.docker.com/build/building/context/#dockerignore-files
|
||||||
|
# Ignore all files by default
|
||||||
|
*
|
||||||
|
|
||||||
|
# Only add necessary files to the Docker build context (Dockerfiles are always included implicitly)
|
||||||
|
!/internal/
|
||||||
|
!/go.mod
|
||||||
|
!/go.sum
|
||||||
|
!main.go
|
||||||
@ -1,7 +1,14 @@
|
|||||||
|
FROM golang:1.22.3-alpine3.19 AS builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . /app
|
||||||
|
RUN CGO_ENABLED=0 go build .
|
||||||
|
|
||||||
|
|
||||||
FROM alpine:3.19
|
FROM alpine:3.19
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY build/glance /app/glance
|
COPY --from=builder /app/glance .
|
||||||
|
|
||||||
EXPOSE 8080/tcp
|
EXPOSE 8080/tcp
|
||||||
ENTRYPOINT ["/app/glance"]
|
ENTRYPOINT ["/app/glance"]
|
||||||
|
|||||||
Loading…
Reference in New Issue