You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
njl
5576a4b1f8
|
3 months ago | |
---|---|---|
.. | ||
Dockerfile | 2 years ago | |
README.md | 2 years ago | |
build.txt | 3 months ago | |
buildAndPush.sh | 2 years ago | |
prime_check.py | 2 years ago | |
requirements.txt | 2 years ago |
README.md
Blackbox Actions
- Download and install the OpenWhisk CLI
- Install OpenWhisk Docker action skeleton.
- Add user code
- Build image
- Push image
- Test out action with CLI
The script buildAndPush.sh
is provided for your convenience. The following command sequence
runs the included example Docker action container using OpenWhisk.
# install dockerSkeleton with example
wsk sdk install docker
# change working directory
cd dockerSkeleton
# build/push, argument is your docker hub user name and a valid docker image name
./buildAndPush <dockerhub username>/whiskexample
# create docker action
wsk action create dockerSkeletonExample --docker <dockerhub username>/whiskExample
# invoke created action
wsk action invoke dockerSkeletonExample --blocking
The executable file must be located in the /action
folder.
The name of the executable must be /action/exec
and can be any file with executable permissions.
The sample docker action runs example.c
by copying and building the source inside the container
as /action/exec
(see Dockerfile
lines 7 and 14).