-
Notifications
You must be signed in to change notification settings - Fork 18
operator-sdk build storageos/cluster-operator:test fails #116
Comments
Hi, thanks for reporting. Sorry that we haven't kept the setup docs up-to-date. I tried the above command with sdk cli v0.5.0 and it still seems to work fine: $ operator-sdk build storageos/cluster-operator:test
INFO[0043] Building Docker image storageos/cluster-operator:test
Sending build context to Docker daemon 555.1MB
Step 1/19 : ARG BUILD_IMAGE=golang:1.11.5
Step 2/19 : ARG BASE_IMAGE=storageos/base-image:0.1.0
Step 3/19 : ARG OPERATOR_IMAGE=storageos/cluster-operator:test
Step 4/19 : FROM ${BUILD_IMAGE} AS build
---> 1454e2b3d01f
Step 5/19 : ARG OPERATOR_IMAGE
---> Using cache
---> 4397c83947a9
Step 6/19 : WORKDIR /go/src/github.com/storageos/cluster-operator/
---> Using cache
---> 4fabc099bf85
Step 7/19 : COPY . /go/src/github.com/storageos/cluster-operator/
---> 68932543c697
Step 8/19 : RUN make operator-sdk
---> Running in 09b01c85b500
# Download sdk only if it's not available.
Removing intermediate container 09b01c85b500
---> d45490ef315d
Step 9/19 : RUN make generate
---> Running in 03ea2698f1c5
./build/operator-sdk generate k8s
time="2019-05-01T08:23:12Z" level=info msg="Running code-generation for Custom Resource group versions: [storageos:v1, ]\n"
Generating deepcopy funcs
time="2019-05-01T08:23:17Z" level=info msg="Code-generation complete."
Removing intermediate container 03ea2698f1c5
---> ba0e3d11622f
Step 10/19 : RUN make build/cluster-operator OPERATOR_IMAGE=$OPERATOR_IMAGE
---> Running in bb7890cbe173
Building cluster-operator
GOOS=linux CGO_ENABLED=0 go build -v -ldflags "-X github.com/storageos/cluster-operator/pkg/controller/storageosupgrade.operatorImage=storageos/cluster-operator:test" \
-o ./build/_output/bin/cluster-operator \
./cmd/manager
github.com/storageos/cluster-operator/vendor/github.com/operator-framework/operator-sdk/version
github.com/storageos/cluster-operator/vendor/k8s.io/apimachinery/pkg/selection
...
...
Removing intermediate container bb7890cbe173
---> 235601d42f37
Step 11/19 : RUN make build/upgrader
---> Running in 862cd7cd6efd
Building upgrader
GOOS=linux CGO_ENABLED=0 go build -v \
-o ./build/_output/bin/upgrader \
./cmd/upgrader
github.com/storageos/cluster-operator/cmd/upgrader
Removing intermediate container 862cd7cd6efd
---> fc63213880d6
Step 12/19 : FROM ${BASE_IMAGE}
---> be23d728480f
...
Step 17/19 : COPY --from=build /go/src/github.com/storageos/cluster-operator/build/_output/bin/cluster-operator /usr/local/bin/cluster-operator
---> d856c9675e46
Step 18/19 : COPY --from=build /go/src/github.com/storageos/cluster-operator/build/_output/bin/upgrader /usr/local/bin/upgrader
---> 1b3aebffe13d
Step 19/19 : COPY --from=build /go/src/github.com/storageos/cluster-operator/cmd/image-puller/docker-puller.sh /usr/local/bin/docker-puller.sh
---> 144dc9a83296
Successfully built 144dc9a83296
Successfully tagged storageos/cluster-operator:test
INFO[0124] Operator build complete. Using the make file is the recommended way to develop, we don't guarantee |
i have
make image/cluster-operator
fails if i heck Dockerfile
then it works :
|
$GOPATH/bin/operator-sdk build storageos/cluster-operator:test works and creates image as well |
Interesting... I've seen this behavior in the redhat container build service. The container runtime doesn't support arguments and templates. And for that we have a separate Dockerfile. It looks similar to the changes you made. |
sure, docker version
|
Thanks. I'm using 18.09 on my development machine. But our CI uses 17.09 https://travis-ci.org/storageos/cluster-operator/jobs/526864684#L33-L48 and the image building works fine there https://travis-ci.org/storageos/cluster-operator/jobs/526864684#L856. |
sure :
|
CI also uses ubuntu. Now I've no clue why we are seeing different behaviors for the same major version of docker and OS. |
i am ok to build it with heck-ed Dockerfile |
I usually just follow the official docs https://docs.docker.com/install/linux/docker-ce/ubuntu/ . AFAIK the docker daemon does everything and you have to restart the daemon process to enable the new version. |
oh, this now can be a bit of the problem :) for me now, as i am running kube and it's apps on this cluster. |
from readme :
$GOPATH/bin/operator-sdk build storageos/cluster-operator:test
INFO[0000] Building Docker image storageos/cluster-operator:test
Sending build context to Docker daemon 281.3 MB
Step 1/19 : ARG BUILD_IMAGE=golang:1.11.5
Please provide a source image with
from
prior to commitError: failed to output build image storageos/cluster-operator:test: (failed to exec []string{"docker", "build", ".", "-f", "build/Dockerfile", "-t", "storageos/cluster-operator:test"}: exit status 1)
trying :
:~/go/src/github.com/storageos/cluster-operator# docker build . -f build/Dockerfile -t storageos/cluster-operator:test
Sending build context to Docker daemon 281.3 MB
Step 1/19 : ARG BUILD_IMAGE=golang:1.11.5
Please provide a source image with
from
prior to commitThe text was updated successfully, but these errors were encountered: