forked from awslabs/aws-iot-device-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
24 lines (18 loc) · 959 Bytes
/
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
# This is a multi-stage Dockerfile used for building minimum sized images of Device Client from your current directory.
ARG OS
ARG BASE_IMAGE
FROM ${BASE_IMAGE} AS deploy
###############################################################################
# Copy and build device client
###############################################################################
COPY . /root/aws-iot-device-client
RUN mkdir -p /root/aws-iot-device-client/build \
&& cd /root/aws-iot-device-client/build \
&& cmake .. \
&& cmake --build . --target aws-iot-device-client
ENTRYPOINT ["/root/aws-iot-device-client/build/aws-iot-device-client"]
FROM ${OS} AS minimum_size
COPY --from=deploy /root/aws-iot-device-client/build/aws-iot-device-client ./aws-iot-device-client
COPY --from=deploy /root/aws-iot-device-client/sample-job-handlers /root/.aws-iot-device-client/jobs
RUN chmod 700 /root/.aws-iot-device-client/jobs/*.sh
ENTRYPOINT ["/aws-iot-device-client"]