Skip to content
This repository has been archived by the owner on Aug 16, 2019. It is now read-only.

Commit

Permalink
[OCF-75] dockerskeleton: Switch to CentOS 7
Browse files Browse the repository at this point in the history
  • Loading branch information
goldmann committed Mar 26, 2018
1 parent 1f8f2d4 commit ce9af22
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
27 changes: 22 additions & 5 deletions docker/runtimes/dockerskeleton/Dockerfile
@@ -1,6 +1,23 @@
# Dockerfile for docker skeleton (useful for running blackbox binaries, scripts, or Python 3 actions) .
FROM openwhisk/dockerskeleton:1.1.0
# Latest images from Mar 22nd
FROM jboss/base@sha256:39bcf23f34ca58db0769121674d2a82aa4ea2ae9c956e280cb0ba1ef64c68b51

# OpenShift compatibility
RUN chgrp -R 0 /actionProxy \
&& chmod -R g+rwX /actionProxy
ARG OPENWHISK_RUNTIME_VERSION="dockerskeleton@1.2.0"

ENV FLASK_PROXY_PORT 8080

USER root

RUN yum -y --setopt=tsflags=nodocs install epel-release \
&& yum -y --setopt=tsflags=nodocs install python-pip \
&& yum clean all \
&& rm -rf /var/cache/yum \
&& pip install --no-cache-dir gevent==1.2.1 flask==0.12 \
&& mkdir -p /action /actionProxy \
&& curl -sSL https://raw.githubusercontent.com/apache/incubator-openwhisk-runtime-docker/$OPENWHISK_RUNTIME_VERSION/core/actionProxy/actionproxy.py -o /actionProxy/actionproxy.py \
&& curl -sSL https://raw.githubusercontent.com/apache/incubator-openwhisk-runtime-docker/$OPENWHISK_RUNTIME_VERSION/core/actionProxy/stub.sh -o /action/exec \
&& chmod +x /action/exec \
&& for d in /action /actionProxy; do chown jboss:root -R $d; chmod -R g+rwX $d; done

USER 1000

CMD ["/bin/bash", "-c", "cd /actionProxy && python -u actionproxy.py"]
3 changes: 3 additions & 0 deletions resources/vars.sh
@@ -0,0 +1,3 @@
#!/bin/bash

echo "{\"activation_id\":\"${__OW_ACTIVATION_ID}\",\"action_name\":\"${__OW_ACTION_NAME}\",\"deadline\":\"${__OW_DEADLINE}\",\"api_key\":\"${__OW_API_KEY}\",\"api_host\":\"${__OW_API_HOST}\",\"namespace\":\"${__OW_NAMESPACE}\"}"
3 changes: 2 additions & 1 deletion tools/travis/test.sh
Expand Up @@ -74,9 +74,10 @@ wsk -i action create testsh-vars-js6 resources/vars.js --kind nodejs:6
wsk -i action create testsh-vars-js8 resources/vars.js --kind nodejs:8
wsk -i action create testsh-vars-java resources/vars.jar --main Vars
wsk -i action create testsh-vars-php7 resources/vars.php --kind php:7.1
wsk -i action create testsh-vars-sh resources/vars.sh --native

# Invoke them, and delete them
for i in {py2,py3,js6,js8,java,php7}; do
for i in {py2,py3,js6,js8,java,php7,sh}; do
invoke testsh-vars-$i
wsk -i action delete testsh-vars-$i
done
Expand Down

0 comments on commit ce9af22

Please sign in to comment.