-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 889 Bytes
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 889 Bytes
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
ARG base_tag=latest
ARG scratch_img=ubuntu
ARG scratch_img_tag=latest
FROM ghcr.io/testillano/diametercodec_builder:${base_tag} as builder
MAINTAINER testillano
LABEL testillano.diametercodec.description="ert_diametercodec library image"
COPY . /code
WORKDIR /code
ARG make_procs=4
ARG build_type=Release
# ert_diametercodec
#COPY . /code/build/diametercodec/
RUN cmake -DCMAKE_BUILD_TYPE=${build_type} . && make -j${make_procs}
FROM ${scratch_img}:${scratch_img_tag}
ARG build_type=Release
COPY --from=builder /code/build/${build_type}/bin/printHardcodedStacks /opt/
# Ubuntu has bash already installed, but vim is missing
ARG os_type=ubuntu
RUN if [ "${os_type}" = "alpine" ] ; then apk update && apk add bash jq && rm -rf /var/cache/apk/* ; elif [ "${os_type}" = "ubuntu" ] ; then apt-get update && apt-get install -y vim jq && apt-get clean ; fi
ENTRYPOINT ["/bin/bash"]
CMD []