-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: installing libpostal in docker images
- Loading branch information
Showing
5 changed files
with
30 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
libpostal/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,38 @@ | ||
FROM quay.io/fedora/fedora:40-x86_64 as builder | ||
# Stage 1: Install dependencies with root privileges | ||
FROM registry.access.redhat.com/ubi9/go-toolset as builder-deps | ||
USER root | ||
RUN dnf install -y --allowerasing --setopt=tsflags=nodocs \ | ||
curl \ | ||
autoconf \ | ||
automake \ | ||
libtool \ | ||
pkgconfig \ | ||
&& dnf clean all | ||
|
||
# Stage 2: Build the application | ||
FROM registry.access.redhat.com/ubi9/go-toolset as builder | ||
ARG VERSION | ||
RUN yum install -y git golang make npm wget glibc | ||
WORKDIR /opt/app-root/src/ | ||
COPY --from=builder-deps /usr /usr | ||
COPY . . | ||
RUN go mod download | ||
RUN make install | ||
RUN VERSION=${VERSION} make build-server | ||
|
||
# Stage 3: Frontend build | ||
FROM node:21-bookworm as frontend | ||
COPY webui/ /watchman/ | ||
WORKDIR /watchman/ | ||
RUN npm install --legacy-peer-deps | ||
RUN npm run build | ||
|
||
FROM quay.io/fedora/fedora:40-x86_64 | ||
RUN yum install -y glibc | ||
|
||
# Stage 4: Final stage | ||
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.5-1733767867 | ||
ARG VERSION=unknown | ||
LABEL maintainer="Moov <oss@moov.io>" | ||
LABEL name="watchman" | ||
LABEL version=$VERSION | ||
|
||
COPY --from=builder /opt/app-root/src/bin/server /bin/server | ||
|
||
COPY --from=frontend /watchman/build/ /watchman/ | ||
ENV WEB_ROOT=/watchman/ | ||
|
||
ENTRYPOINT ["/bin/server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters