@@ -100,7 +100,7 @@ def validate_auth():
100100
101101tilt_helper_dockerfile_header = """
102102# Tilt image
103- FROM golang:1.20 as tilt-helper
103+ FROM golang:1.23.6 as tilt-helper
104104# Support live reloading with Tilt
105105RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/windmilleng/rerun-process-wrapper/master/restart.sh && \
106106 wget --output-document /start.sh --quiet https://raw.githubusercontent.com/windmilleng/rerun-process-wrapper/master/start.sh && \
@@ -109,10 +109,13 @@ RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com
109109
110110tilt_dockerfile_header = """
111111FROM gcr.io/distroless/base:debug as tilt
112- WORKDIR /
112+ WORKDIR /app
113113COPY --from=tilt-helper /start.sh .
114114COPY --from=tilt-helper /restart.sh .
115115COPY manager .
116+ RUN ["/busybox/chmod", "+x", "/app/start.sh", "/app/restart.sh", "/app/manager"]
117+ RUN ["/busybox/chown", "-R", "65532:65532", "/app"]
118+ USER 65532:65532
116119"""
117120
118121# Build CAPDO and add feature gates
@@ -135,16 +138,16 @@ def capdo():
135138 # Set up a local_resource build of the provider's manager binary.
136139 local_resource (
137140 "manager" ,
138- cmd = 'mkdir -p .tiltbuild;CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags \' -extldflags "-static"\' -o .tiltbuild/manager' ,
139- deps = ["api" , "cloud" , "config" , "controllers " , "exp " , "feature " , "pkg " , "go.mod" , "go.sum" , "main.go " ]
141+ cmd = 'mkdir -p .tiltbuild;CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags \' -extldflags "-static"\' -o .tiltbuild/manager ./cmd ' ,
142+ deps = ["api" , "cloud" , "config" , "internal " , "cmd " , "util " , "version " , "go.mod" , "go.sum" ]
140143 )
141144
142145 dockerfile_contents = "\n " .join ([
143146 tilt_helper_dockerfile_header ,
144147 tilt_dockerfile_header ,
145148 ])
146149
147- entrypoint = ["sh" , "/start.sh" , "/manager" ]
150+ entrypoint = ["sh" , "/app/ start.sh" , "/app /manager" ]
148151 extra_args = settings .get ("extra_args" )
149152 if extra_args :
150153 entrypoint .extend (extra_args )
@@ -159,8 +162,8 @@ def capdo():
159162 entrypoint = entrypoint ,
160163 only = "manager" ,
161164 live_update = [
162- sync (".tiltbuild/manager" , "/manager" ),
163- run ("sh /restart.sh" ),
165+ sync (".tiltbuild/manager" , "/app/ manager" ),
166+ run ("sh /app/ restart.sh" ),
164167 ],
165168 ignore = ["templates" ]
166169 )
@@ -203,7 +206,7 @@ include_user_tilt_files()
203206load ("ext://cert_manager" , "deploy_cert_manager" )
204207
205208if settings .get ("deploy_cert_manager" ):
206- deploy_cert_manager ()
209+ deploy_cert_manager (version = settings . get ( "cert_manager_version" ) )
207210
208211deploy_capi ()
209212
0 commit comments