|
1 | 1 | # NOTE: The docker build context directory must be the root of the source tree. |
2 | 2 | # NOTE: To build the release image, SQLFlow must be built into ./build |
3 | | -FROM ubuntu:18.04 |
| 3 | +FROM alpine:3.12 |
4 | 4 |
|
5 | 5 | ARG FIND_FASTED_MIRROR=true |
6 | 6 |
|
7 | | -# Choose faster mirrors for apt-get and pip |
| 7 | +# Choose faster mirrors for alpine and pip |
8 | 8 | # Install docker.io to release model defininiation |
9 | 9 | COPY docker/dev/find_fastest_resources.sh /usr/local/bin/ |
10 | | -RUN bash -c 'if [ "$FIND_FASTED_MIRROR" == "true" ]; then source find_fastest_resources.sh && \ |
11 | | - echo "Choose the fastest APT source ..." && \ |
12 | | - choose_fastest_apt_source; fi' && \ |
13 | | - apt-get -qq update && \ |
14 | | - apt-get -qq install -y axel sudo docker.io |
| 10 | +RUN /bin/sh -c 'if [ "$FIND_FASTED_MIRROR" == "true" ]; then source find_fastest_resources.sh && \ |
| 11 | + echo "Choose the fastest Alpine source ..." && \ |
| 12 | + choose_fastest_alpine_source && \ |
| 13 | + echo "Choose the fastest PIP source ..." && \ |
| 14 | + choose_fastest_pip_source && \ |
| 15 | + apk add --no-cache python3 py3-pip sudo bash docker-cli && \ |
| 16 | + wget -q -O /etc/apk/keys/sgerrand.rsa.pub http://cdn.sqlflow.tech/alpine/sgerrand.rsa.pub.txt && \ |
| 17 | + wget -q http://cdn.sqlflow.tech/alpine/glibc-2.31-r0.apk && \ |
| 18 | + apk add glibc-2.31-r0.apk && \ |
| 19 | + rm glibc-2.31-r0.apk && \ |
| 20 | + ln -s /usr/bin/python3 /usr/local/bin/python && \ |
| 21 | + ln -s /usr/bin/pip3 /usr/local/bin/pi; fi' |
15 | 22 |
|
16 | 23 | # Install pre-built SQLFlow components. |
17 | 24 | COPY build/modelzooserver /usr/local/bin/modelzooserver |
|
0 commit comments