Skip to content

Commit

Permalink
Simplify, just copy from the build area into a clean env.
Browse files Browse the repository at this point in the history
  • Loading branch information
sobomax committed Jul 29, 2024
1 parent 190ff9b commit b23d97c
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions docker/Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# syntax=docker/dockerfile:1.7-labs

ARG BASE_IMAGE
ARG BASE_IMAGE="debian:sid-slim"
FROM ${BASE_IMAGE} AS build
LABEL maintainer="Maksym Sobolyev <sobomax@sippysoft.com>"

ARG BUILD_PKGS="cmake make gcc libc6-dev openssl"
ARG DEBIAN_FRONTEND=noninteractive
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install -y --no-install-recommends ${BUILD_PKGS}
RUN apt-get update && apt-get install -y --no-install-recommends ${BUILD_PKGS}
WORKDIR /src
RUN --mount=type=bind,target=.,rw cmake -B build && make -C build all test install
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get remove -y --purge ${BUILD_PKGS} && \
apt-get autoremove -y --purge
FROM ${BASE_IMAGE} AS clean
COPY --from=build /usr/local/lib/libg722.* /usr/local/lib/
COPY --from=build /usr/local/include/g722* /usr/local/include/

0 comments on commit b23d97c

Please sign in to comment.