Created
December 29, 2018 04:12
-
-
Save QiMata/b3c2a201514b73d789a773686d55537b to your computer and use it in GitHub Desktop.
Changing the dockerfile to add LibCurl so that the module can download from the Izon Camera
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:xenial AS base | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends software-properties-common gdb && \ | |
add-apt-repository -y ppa:aziotsdklinux/ppa-azureiot && \ | |
apt-get update && \ | |
apt-get install -y azure-iot-sdk-c-dev && \ | |
rm -rf /var/lib/apt/lists/* | |
FROM base AS build-env | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends cmake gcc g++ make libcurl4-openssl-dev && \ | |
rm -rf /var/lib/apt/lists/* | |
WORKDIR /app | |
COPY . ./ | |
RUN cmake -DCMAKE_BUILD_TYPE=Debug . | |
RUN make | |
FROM base | |
WORKDIR /app | |
COPY --from=build-env /app ./ | |
CMD ["./main"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:xenial AS base | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends software-properties-common gdb && \ | |
add-apt-repository -y ppa:aziotsdklinux/ppa-azureiot && \ | |
apt-get update && \ | |
apt-get install -y azure-iot-sdk-c-dev && \ | |
rm -rf /var/lib/apt/lists/* | |
FROM base AS build-env | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends cmake gcc g++ make && \ | |
rm -rf /var/lib/apt/lists/* | |
WORKDIR /app | |
COPY . ./ | |
RUN cmake -DCMAKE_BUILD_TYPE=Debug . | |
RUN make | |
FROM base | |
WORKDIR /app | |
COPY --from=build-env /app ./ | |
CMD ["./main"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment