Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (32 loc) · 1.91 KB
/
Copy pathDockerfile
File metadata and controls
41 lines (32 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Pulled from ECR Public (the Debian team mirrors official images there)
# instead of Docker Hub to avoid anonymous-pull rate limits from AWS
# CodeBuild, which shares an outbound IP pool with many other accounts.
# The base must carry the glibc the binaries in target/release were linked
# against: bookworm for the bookworm-built stable image (publish-image.yml),
# trixie for the edge image, which packages the Ubuntu-built release archives
# (glibc 2.39 or newer; release-edge.yml). On GitHub-hosted runners, whose
# anonymous ECR Public pulls are throttled, those workflows pass the Docker
# Official Image instead when they are logged in to Docker Hub.
ARG BASE_IMAGE=public.ecr.aws/debian/debian:bookworm-slim
FROM ${BASE_IMAGE}
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl tini \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd --system omnigraph \
&& useradd --system --gid omnigraph --create-home --home-dir /var/lib/omnigraph omnigraph
COPY target/release/omnigraph-server /usr/local/bin/omnigraph-server
# The CLI ships for non-Azure day-2 workflows and read-only inspection. Never
# start an Azure writer with `docker exec` / ECS exec / `railway shell`: quiesce
# the server and run that writer as a job through omnigraph-azure-admission.
COPY target/release/omnigraph /usr/local/bin/omnigraph
COPY target/release/omnigraph-azure-admission /usr/local/bin/omnigraph-azure-admission
COPY docker/entrypoint.sh /usr/local/bin/omnigraph-entrypoint
RUN chmod 0755 /usr/local/bin/omnigraph-server /usr/local/bin/omnigraph \
/usr/local/bin/omnigraph-azure-admission /usr/local/bin/omnigraph-entrypoint
ENV OMNIGRAPH_BIND=0.0.0.0:8080
WORKDIR /var/lib/omnigraph
USER omnigraph:omnigraph
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -fsS http://127.0.0.1:8080/healthz >/dev/null || exit 1
ENTRYPOINT ["/usr/local/bin/omnigraph-entrypoint"]