-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (26 loc) · 1.08 KB
/
Dockerfile
File metadata and controls
36 lines (26 loc) · 1.08 KB
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
27
28
29
30
31
32
33
34
35
36
#syntax=docker/dockerfile:1
#--[ Build/Deploy Runner ]------------------------------------------------------
# Base uses an x86 alpine container. The x86 part is essential, since all tar-
# geted MCUs are using 32-bit architectures
FROM i386/alpine:latest AS base-runner
# Minimal build environment dependencies
RUN apk add --update --no-cache \
autoconf \
build-base
# Use /var/cutest as working directory
WORKDIR /var/cutest
#--[ Build stage ]--------------------------------------------------------------
# Uses the previously defined build/deploy runner
FROM base-runner AS builder
ARG CUTEST_LIB_VERSION
ENV CUTEST_LIB_VERSION ${CUTEST_LIB_VERSION}
# Copy CuTest sources into workdir
COPY src/* ./
# Build libcutest binaries
RUN make all
#--[ Deploy stage ]-------------------------------------------------------------
# Uses the previously defined build/deploy runner
FROM base-runner as cutest
# Copy CuTest headers and built library
COPY --from=builder /var/cutest/libcutest.a /usr/lib/
COPY --from=builder /var/cutest/CuTest.h /usr/include/