2024-03-08 20:31:09 +00:00
|
|
|
FROM golang:alpine3.18 AS build
|
2024-03-08 20:19:17 +00:00
|
|
|
WORKDIR /build
|
|
|
|
COPY ./src ./src
|
|
|
|
WORKDIR /build/src
|
|
|
|
RUN apk add gcc libc-dev
|
|
|
|
RUN go get .
|
|
|
|
RUN CGO_ENABLED=1 go build -o /build/uf-bob
|
|
|
|
|
|
|
|
FROM alpine:3.17 AS final
|
|
|
|
COPY --from=build /build/uf-bob /bin/uf-bob
|
2024-03-08 20:31:09 +00:00
|
|
|
COPY --from=build /build/src/migrations /pb_migrations
|
2024-03-08 20:19:17 +00:00
|
|
|
ENTRYPOINT [ "/bin/uf-bob", "serve", "--http=0.0.0.0:80", "--dir=/pb_data", "--public-dir=/pb_public", "--migrationsDir=/pb_migrations" ]
|