Skip to content

Commit

Permalink
Create final build stage with just combined providers file (#9)
Browse files Browse the repository at this point in the history
* Create final build stage with just combined providers file

* Update Dockerfile

* Fix Makefile bug when jq is missing, and install jq in docker

* Fix typo in Dockerfile
  • Loading branch information
ml-evs authored Aug 28, 2024
1 parent 2311471 commit 53c2dc8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM python:3.12-alpine AS builder
RUN apk add --no-cache make
RUN apk add --no-cache make jq
WORKDIR /opt
RUN pip install uv
RUN uv venv
Expand All @@ -9,3 +9,8 @@ WORKDIR /app
COPY Makefile schema.yaml ./
COPY src src
RUN source /opt/.venv/bin/activate && make all

FROM alpine AS final

WORKDIR /app
COPY --from=builder /app/combined.yaml .
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ validate: $(ENTRIES) # Validate each entry in `./src/instances` against the sche
entry_id=$$(yq -r '.id' $$file)
if [ "$$file_id" != "$$entry_id" ]; then
echo " ✗ $$file_id != $$entry_id (entry ID and file name do not match)"
errored=true
fi;
output=$$(linkml-validate -s schema.yaml $$file 2>&1); status=$$?
if [ $$status -ne 0 ]; then
Expand Down

0 comments on commit 53c2dc8

Please sign in to comment.