Skip to content

Commit

Permalink
Add the development dependency liblzma-dev required for static linkin…
Browse files Browse the repository at this point in the history
…g/compilation.
  • Loading branch information
afinetooth committed Aug 28, 2024
1 parent ee47614 commit 5e49ef0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ ARG BASE_IMAGE_TAG=ubuntu-22.04
# Stage 1: Build for x86_64
FROM 84codes/crystal:${CRYSTAL_VERSION}-${BASE_IMAGE_TAG} AS builder-x86_64
WORKDIR /app
# Clone the coverage-reporter repository
RUN git clone https://github.com/coverallsapp/coverage-reporter.git .
# Install liblzma-dev and other dependencies
RUN apt-get update && apt-get install -y liblzma-dev
# Install production dependencies and build the binary
RUN shards install --production --ignore-crystal-version \
&& shards build coveralls --production --release --static --no-debug --progress \
Expand All @@ -14,7 +17,10 @@ RUN shards install --production --ignore-crystal-version \
# Stage 2: Build for aarch64
FROM 84codes/crystal:${CRYSTAL_VERSION}-${BASE_IMAGE_TAG} AS builder-aarch64
WORKDIR /app
# Copy source code from the x86_64 build
COPY --from=builder-x86_64 /app /app
# Install liblzma-dev and other dependencies
RUN apt-get update && apt-get install -y liblzma-dev
# Install production dependencies and build the binary
RUN shards install --production --ignore-crystal-version \
&& shards build coveralls --production --release --static --no-debug --progress \
Expand Down

0 comments on commit 5e49ef0

Please sign in to comment.