Hi Am trying to Dockerize `pulumi golang` project ...
# golang
b
Hi Am trying to Dockerize
pulumi golang
project …. ended up getting this error ..
Copy code
go build <http://github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/compute|github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/compute>: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed
My machine is a mac — and the image am trying to build is as below
Copy code
FROM golang:1.16.2-alpine3.13

ENV PATH=$PATH:/root/.pulumi/bin

RUN apk update && \
    apk add --no-cache bash curl libc6-compat && \
    curl -fsSL <https://get.pulumi.com> | sh
After this i copy the project and run
pulumi
commands — login is successful to gcs state .
Copy code
#Seting up the state file 
pulumi login ${PULUMI_BACKEND_URL}

#selecting a stack 
pulumi stack select ${PULUMI_STACK} --non-interactive
pulumi config set --path gcpconfig:test.name ${TEST_SERVICE}
pulumi refresh -y --non-interactive
pulumi preview --non-interactive 
pulumi up -f -y --non-interactive
These are my entry point commands and i get the error
Copy code
go build <http://github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/compute|github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/compute>: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed

    error: an unhandled error occurred: program exited with non-zero exit code: 1
g
Is your machine a new Mac M1?
b
No - its a normal mac book pro …
pulumi up
runs fine in local though ..
b
@bored-car-38257 it looks like it's being killed because the docker vm is running out of memory when compiling the go code
the default docker vm is quite small..
b
@billowy-army-68599 - Let me take a look .. thanks for the direction
@billowy-army-68599 - still the same error …
Am not sure why is there a build step . Am using go mod which downloads all the necessary binaries
b
pulumi builds your go project into a binary before it executes
can you bump it even more, please?
1
Sure --- Working on it …
yup it worked with 12 GB of ram ---> 👀
🙌 1
😄 1