AnthoLume/Dockerfile

28 lines
650 B
Docker
Raw Normal View History

# Certificate Store
FROM alpine as certs
RUN apk update && apk add ca-certificates
# Build Image
2023-10-24 11:39:37 +00:00
FROM golang:1.20 AS build
# Install Dependencies
RUN apt-get update -y
RUN apt install -y gcc-x86-64-linux-gnu
# Create Package Directory
WORKDIR /src
RUN mkdir -p /opt/bookmanager
2023-10-24 11:39:37 +00:00
# Compile
RUN go build -o /opt/bookmanager/server; \
cp -a ./templates /opt/bookmanager/templates; \
cp -a ./assets /opt/bookmanager/assets;
2023-09-18 23:57:18 +00:00
# Create Image
FROM busybox:1.36
COPY --from=certs /etc/ssl/certs /etc/ssl/certs
COPY --from=build /opt/bookmanager /opt/bookmanager
WORKDIR /opt/bookmanager
2023-09-18 23:57:18 +00:00
EXPOSE 8585
ENTRYPOINT ["/opt/bookmanager/server", "serve"]