|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | +# contributor license agreements. See the NOTICE file distributed with |
| 4 | +# this work for additional information regarding copyright ownership. |
| 5 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | +# (the "License"); you may not use this file except in compliance with |
| 7 | +# the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | + |
| 18 | +FROM arm64v8/eclipse-temurin:8u422-b05-jdk-noble |
| 19 | + |
| 20 | +ENV DOCKER_VERSION 1.12.0 |
| 21 | +ENV KUBECTL_VERSION v1.16.3 |
| 22 | +ENV WHISK_CLI_VERSION latest |
| 23 | +ENV WHISKDEPLOY_CLI_VERSION latest |
| 24 | + |
| 25 | +RUN apt-get update && apt-get install -y \ |
| 26 | + git \ |
| 27 | + jq \ |
| 28 | + libffi-dev \ |
| 29 | + nodejs \ |
| 30 | + npm \ |
| 31 | + python-is-python3 \ |
| 32 | + python3-pip \ |
| 33 | + python3-venv \ |
| 34 | + wget \ |
| 35 | + zip \ |
| 36 | + locales \ |
| 37 | +&& rm -rf /var/lib/apt/lists/* |
| 38 | + |
| 39 | +# update npm |
| 40 | +RUN npm install -g n && n stable && hash -r |
| 41 | + |
| 42 | +RUN locale-gen en_US.UTF-8 |
| 43 | +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' |
| 44 | + |
| 45 | +WORKDIR /root |
| 46 | + |
| 47 | +RUN python -m venv .venv |
| 48 | +ENV PATH="/root/.venv/bin:$PATH" |
| 49 | + |
| 50 | +# Python packages |
| 51 | +RUN pip3 install --upgrade pip |
| 52 | +RUN pip3 install --upgrade setuptools |
| 53 | +RUN pip3 install cryptography && \ |
| 54 | + pip3 install ansible==2.5.2 && \ |
| 55 | + pip3 install jinja2==2.9.6 && \ |
| 56 | + pip3 install docker |
| 57 | + |
| 58 | +# Install docker client |
| 59 | +RUN wget --no-verbose https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz && \ |
| 60 | + tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker && \ |
| 61 | + rm -f docker-${DOCKER_VERSION}.tgz && \ |
| 62 | + chmod +x /usr/bin/docker |
| 63 | + |
| 64 | +# Install kubectl in /usr/local/bin |
| 65 | +RUN curl -Lo ./kubectl https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl && chmod +x kubectl && mv kubectl /usr/local/bin/kubectl |
| 66 | + |
| 67 | +# Install `wsk` cli in /usr/local/bin |
| 68 | +RUN wget -q https://github.com/apache/openwhisk-cli/releases/download/$WHISK_CLI_VERSION/OpenWhisk_CLI-$WHISK_CLI_VERSION-linux-amd64.tgz && \ |
| 69 | + tar xzf OpenWhisk_CLI-$WHISK_CLI_VERSION-linux-amd64.tgz -C /usr/local/bin wsk && \ |
| 70 | + rm OpenWhisk_CLI-$WHISK_CLI_VERSION-linux-amd64.tgz |
| 71 | + |
| 72 | +# Install wskadmin in /bin |
| 73 | +COPY wskutil.py /bin |
| 74 | +COPY wskprop.py /bin |
| 75 | +COPY wskadmin /bin |
| 76 | + |
| 77 | +# Setup tools/data for certificate generation (used by openwhisk-deploy-kube) |
| 78 | +RUN mkdir /cert-gen |
| 79 | +COPY openwhisk-server-key.pem /cert-gen |
| 80 | +COPY genssl.sh /usr/local/bin/ |
0 commit comments