forked from jenisys/cxx.simplelog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (23 loc) · 1.2 KB
/
Dockerfile
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
# ===========================================================================
# DOCKERFILE: cxx.simplelog (multistage build)
# ===========================================================================
# SEE ALSO:
# https://docs.docker.com/develop/develop-images/multistage-build/
# ===========================================================================
# ---------------------------------------------------------------------------
# STAGE: buildenv
# ---------------------------------------------------------------------------
FROM cxx_alpine:latest AS buildenv
WORKDIR /workdir/cxx.simplelog
COPY . .
# RUN CMAKE_BUILD_CONFIG=host_debug cmake-build cleanup build test
RUN CMAKE_BUILD_CONFIG=release cmake-build build install --prefix=staging
# ---------------------------------------------------------------------------
# STAGE: product -- Installed libs, headers (only end products)
# ---------------------------------------------------------------------------
# NOTE: product image contains only build results from image:buildenv
FROM alpine:latest AS product
RUN apk --no-cache add ca-certificates
WORKDIR /opt/cxx.simplelog
COPY --from=buildenv /workdir/cxx.simplelog/build.release/staging/ .
CMD ["/bin/sh"]