nicholasjackson / open-faas-functions

Collection of functions for OpenFaas (http://openfaas.com)
24 stars 4 forks source link

Unknown option to libcurl error in `go-opencv` #1

Open s8sg opened 6 years ago

s8sg commented 6 years ago

I was trying to build the facedetect detect function This is what I'm doing

faas-cli template pull https://github.com/nicholasjackson/open-faas-templates
faas-cli build -f stack.yml --regex facedetect
faas-cli deploy -f stack.yml --regex facedetect

I'm getting the below error

WARNING: This apk-tools is OLD! Some packages might not function properly.
(1/1) Installing curl (7.61.0-r0)
Executing busybox-1.26.2-r7.trigger
OK: 643 MiB in 73 packages
Pulling watchdog binary from Github.
curl: (48) An unknown option was passed in to libcurl
The command '/bin/sh -c apk --no-cache add curl     && echo "Pulling watchdog binary from Github."     && curl -sSL https://github.com/openfaas/faas/releases/download/0.6.9/fwatchdog > /usr/bin/fwatchdog     && chmod +x /usr/bin/fwatchdog     && apk del curl --no-cache' returned a non-zero code: 48
2018/07/15 13:12:00 ERROR - Could not execute command: [docker build -t nicholasjackson/func_facedetect .]
s8sg commented 6 years ago

As in the log the issue lies in the alpine image in the go-opencv template In the Dockerfile adding the curl-dev along with curl solves the issue

RUN apk --no-cache add curl curl-dev  && echo "Pulling watchdog binary from Github." \
    && /usr/bin/curl -g https://github.com/openfaas/faas/releases/download/0.6.9/fwatchdog > /usr/bin/fwatchdog \
    && chmod +x /usr/bin/fwatchdog \
    && apk del curl curl-dev --no-cache