-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (33 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
27
28
29
30
31
32
33
34
35
36
37
38
#
# Copyright (c) 2019
# IOTech
#
# SPDX-License-Identifier: Apache-2.0
#
ARG DOCKER_VERSION=18.09.5
FROM docker:${DOCKER_VERSION} AS docker-cli
FROM alpine:3.9
LABEL license='SPDX-License-Identifier: Apache-2.0' \
copyright='Copyright (c) 2019: IOTech'
LABEL maintainer="Bruce Huang <[email protected]>"
COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker
COPY robot-entrypoint.sh /usr/local/bin/
RUN echo "**** install Python ****" && \
apk add --no-cache python3 && \
if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \
apk add --no-cache tzdata && \
cp /usr/share/zoneinfo/UTC /etc/localtime && \
apk del tzdata && \
\
echo "**** install pip ****" && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --no-cache --upgrade pip setuptools wheel && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
\
echo "**** install robotframework and dependencies ****" && \
python3 -m pip install robotframework && \
pip3 install docker && \
pip3 install -U python-dotenv && \
pip3 install -U RESTinstance
ENTRYPOINT ["sh", "/usr/local/bin/robot-entrypoint.sh"]