Skip to content

Commit

Permalink
fix: copy in protobufs into docker builds (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe authored Nov 21, 2023
1 parent fa53a98 commit f4d4c20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 3 additions & 2 deletions utils/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Pinning Rust version for now because of this issue:
#
# - https://github.com/rust-lang/rust/issues/95926
FROM rust:1-buster AS builder
FROM rust:1-bookworm AS builder

# Build dependencies first.
#
Expand Down Expand Up @@ -45,6 +45,7 @@ WORKDIR /usr/src/mehari
# Now copy in the rest of the sources.
COPY build.rs Cargo.toml Cargo.lock /usr/src/mehari/
COPY src /usr/src/mehari/src/
COPY protos /usr/src/mehari/protos/
COPY utils/alpine-linker-script.sh /usr/src/mehari/utils/
RUN chmod a+rx /usr/src/mehari/utils/alpine-linker-script.sh
COPY .cargo /usr/src/mehari/.cargo/
Expand All @@ -57,7 +58,7 @@ RUN cargo build --release
# Runtime
# ---------------------------------------------------------------------------

FROM debian:buster-slim AS runtime
FROM debian:bookworm-slim AS runtime

# Install dependencies (and cleanup afterwards)
RUN apt-get update && \
Expand Down
5 changes: 0 additions & 5 deletions utils/docker/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ DOCKER_VERSION=$(echo $GIT_TAG | sed -e 's/^v//')
ORG=bihealth
REPO=mehari

GIT_DEPTH=$(($(git rev-list HEAD ^$(git describe --abbrev=0 --tags) --count) + 1))
GIT_URL=https://github.com/$ORG/$REPO.git

docker build . \
--file utils/docker/Dockerfile \
--build-arg git_treeish=$GIT_TAG \
--build-arg git_url=$GIT_URL \
--pull \
-t ghcr.io/$ORG/$REPO:$DOCKER_VERSION

0 comments on commit f4d4c20

Please sign in to comment.