@@ -157,7 +157,6 @@ func (g *generalGraph) preparePythonBase(root llb.State) llb.State {
157
157
sb .WriteString (strings .Join (types .BaseAptPackage , " " ))
158
158
sb .WriteString ("&& rm -rf /var/lib/apt/lists/* " )
159
159
// shell prompt
160
- sb .WriteString ("&& curl --proto '=https' --tlsv1.2 -sSf https://starship.rs/install.sh | sh -s -- -y" )
161
160
sb .WriteString ("&& locale-gen en_US.UTF-8" )
162
161
163
162
run := root .Run (llb .Shlexf (`bash -c "%s"` , sb .String ()),
@@ -174,6 +173,14 @@ func (g generalGraph) compileSSHD(root llb.State) llb.State {
174
173
return sshd
175
174
}
176
175
176
+ func (g generalGraph ) compileStarship (root llb.State ) llb.State {
177
+ starship := root .File (llb .Copy (
178
+ llb .Image (types .EnvdStarshipImage ), "/usr/local/bin/starship" , "/usr/local/bin/starship" ,
179
+ & llb.CopyInfo {CreateDestPath : true }),
180
+ llb .WithCustomName (fmt .Sprintf ("[internal] add envd-starship from %s" , types .EnvdStarshipImage )))
181
+ return starship
182
+ }
183
+
177
184
func (g * generalGraph ) compileBase () (llb.State , error ) {
178
185
logger := logrus .WithFields (logrus.Fields {
179
186
"os" : g .OS ,
@@ -217,7 +224,8 @@ func (g *generalGraph) compileBase() (llb.State, error) {
217
224
condaStage := g .installConda (base )
218
225
supervisor := g .installHorust (condaStage )
219
226
sshdStage := g .compileSSHD (supervisor )
220
- source , err := g .compileExtraSource (sshdStage )
227
+ starshipStage := g .compileStarship (sshdStage )
228
+ source , err := g .compileExtraSource (starshipStage )
221
229
if err != nil {
222
230
return llb.State {}, errors .Wrap (err , "failed to get extra sources" )
223
231
}
0 commit comments