Skip to content

Commit 343ad5f

Browse files
authored
Do not pin invocation image to a specific debian release (getporter#2745)
* Do not pin invocation image to a specific debian release Use stable instead of a specific debian release, so that when the release is archived, we don't end up with an unbuildable bundle. If a user wants to pin to a base image, they should use a custom Dockerfile. Porter should default to a release (stable) that will always work, so that porter doesn't need to be recompiled or a new version installed because a debian release was archived. Signed-off-by: Carolyn Van Slyck <[email protected]> * Use golang:latest for our (defunct) developer workshop Update the Porter workshop images to use golang:latest so that we don't need to keep updating it when it works just fine with any version of Go. Signed-off-by: Carolyn Van Slyck <[email protected]> --------- Signed-off-by: Carolyn Van Slyck <[email protected]>
1 parent 75af472 commit 343ad5f

File tree

15 files changed

+24
-24
lines changed

15 files changed

+24
-24
lines changed

docs/content/blog/docker-mixin-blog-post.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Run Whalesay
106106
Now, we will go through an example of how you can incorporate and build your own Docker image and then push it to Docker hub. First, you will need to create a Dockerfile named Dockerfile-cookies next to your porter.yaml and copy paste the code below into the file.
107107

108108
```
109-
FROM debian:stretch-slim
109+
FROM debian:stable-slim
110110
111111
CMD ["echo", "Everyone loves cookies"]
112112
```
@@ -176,7 +176,7 @@ After it runs, you should see output that the image was built and tagged success
176176
```
177177
Build image
178178
Sending build context to Docker daemon 101.2MB
179-
Step 1/2 : FROM debian:stretch-slim
179+
Step 1/2 : FROM debian:stable-slim
180180
---> 614bb74b620e
181181
Step 2/2 : CMD ["echo", "Everyone loves cookies"]
182182
---> Using cache

docs/content/build-image.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ actions:
8080
description: World 2.0
8181
8282
/Users/sigje/.porter/mixins/exec/exec build --debug
83-
FROM --platform=linux/amd64 debian:stretch-slim
83+
FROM --platform=linux/amd64 debian:stable-slim
8484
8585
ARG BUNDLE_DIR
8686
@@ -97,7 +97,7 @@ WORKDIR ${BUNDLE_DIR}
9797
CMD ["/cnab/app/run"]
9898
9999
Writing Dockerfile =======>
100-
FROM --platform=linux/amd64 debian:stretch-slim
100+
FROM --platform=linux/amd64 debian:stable-slim
101101
102102
ARG BUNDLE_DIR
103103
@@ -114,7 +114,7 @@ WORKDIR ${BUNDLE_DIR}
114114
CMD ["/cnab/app/run"]
115115
116116
Starting Invocation Image Build =======>
117-
Step 1/9 : FROM --platform=linux/amd64 debian:stretch-slim
117+
Step 1/9 : FROM --platform=linux/amd64 debian:stable-slim
118118
---> 5738956efb6b
119119
Step 2/9 : ARG BUNDLE_DIR
120120
---> Using cache
@@ -208,7 +208,7 @@ After copying any mixins to the .cnab directory, a Dockerfile is generated:
208208

209209
```console
210210
Generating Dockerfile =======>
211-
FROM --platform=linux/amd64 debian:stretch
211+
FROM --platform=linux/amd64 debian:stable-slim
212212
213213
ARG BUNDLE_DIR
214214
@@ -231,7 +231,7 @@ Once this is completed, the image is built:
231231

232232
```console
233233
Starting Invocation Image Build =======>
234-
Step 1/9 : FROM --platform=linux/amd64 debian:stretch
234+
Step 1/9 : FROM --platform=linux/amd64 debian:stable-slim
235235
---> 5c43e435cc11
236236
Step 2/9 : ARG BUNDLE_DIR
237237
---> Using cache
@@ -306,7 +306,7 @@ Copying mixins ===>
306306
Copying mixin helm ===>
307307
308308
Generating Dockerfile =======>
309-
FROM --platform=linux/amd64 debian:stretch-slim
309+
FROM --platform=linux/amd64 debian:stable-slim
310310
311311
ARG BUNDLE_DIR
312312

docs/content/bundle/custom-dockerfile.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ When you run porter create, a template Dockerfile is created for you in the curr
2424

2525
# You can control where the mixin's Dockerfile lines are inserted into this file by moving the "# PORTER_*" tokens
2626
# another location in this file. If you remove a token, its content is appended to the end of the Dockerfile.
27-
FROM --platform=linux/amd64 debian:stretch-slim
27+
FROM --platform=linux/amd64 debian:stable-slim
2828

2929
# PORTER_INIT
3030

docs/content/slides/pack-your-bags-msp/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ Generating parameter definition porter-debug ====>
528528
### Dockerfile
529529
```Dockerfile
530530
FROM quay.io/deis/lightweight-docker-go:v0.2.0
531-
FROM debian:stretch-slim
531+
FROM debian:stable-slim
532532
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
533533

534534
ARG BUNDLE_DIR
@@ -1096,7 +1096,7 @@ dockerfile: Dockerfile.tmpl
10961096
### Dockerfile.tmpl
10971097

10981098
```Dockerfile
1099-
FROM debian:stretch-slim
1099+
FROM debian:stable-slim
11001100

11011101
ARG BUNDLE_DIR
11021102

docs/content/slides/pack-your-bags/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ Generating parameter definition porter-debug ====>
570570
### Dockerfile
571571
```Dockerfile
572572
FROM quay.io/deis/lightweight-docker-go:v0.2.0
573-
FROM debian:stretch-slim
573+
FROM debian:stable-slim
574574
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
575575

576576
COPY . /cnab/app
@@ -1011,7 +1011,7 @@ dockerfile: Dockerfile.tmpl
10111011
### Dockerfile.tmpl
10121012
10131013
```Dockerfile
1014-
FROM debian:stretch-slim
1014+
FROM debian:stable-slim
10151015

10161016
RUN apt-get install -y curl
10171017

@@ -1341,7 +1341,7 @@ convert cute pictures of gophers into ASCII art when you install the bundle.
13411341
Here are some hints so that you can try to solve it in your own way.
13421342
For the full solution, see the [asciiart][asciiart] directory in the workshop materials.
13431343

1344-
* A good base image for go is `golang:1.11-stretch`.
1344+
* A good base image for go is `golang:latest`.
13451345
* You need to run `porter build` after modifying the Dockerfile.tmpl to rebuild
13461346
your invocation image to pick up your changes.
13471347
* Don't forget to copy your images into your invocation image to /cnab/app/.

pkg/build/buildkit/testdata/custom-build-arg.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile-upstream:1.4.0
2-
FROM --platform=linux/amd64 debian:stretch-slim
2+
FROM --platform=linux/amd64 debian:stable-slim
33

44
# PORTER_INIT
55

pkg/build/buildkit/testdata/template.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile-upstream:1.4.0
2-
FROM --platform=linux/amd64 debian:stretch-slim
2+
FROM --platform=linux/amd64 debian:stable-slim
33

44
# PORTER_INIT
55

pkg/build/testdata/buildkit.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile-upstream:1.4.0
2-
FROM --platform=linux/amd64 debian:stretch-slim
2+
FROM --platform=linux/amd64 debian:stable-slim
33

44
ARG BUNDLE_DIR
55
ARG BUNDLE_UID=65532

pkg/templates/templates/build/buildkit.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile-upstream:1.4.0
2-
FROM --platform=linux/amd64 debian:stretch-slim
2+
FROM --platform=linux/amd64 debian:stable-slim
33

44
# PORTER_INIT
55

pkg/templates/templates/create/template.buildkit.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# another location in this file. If you remove a token, its content is appended to the end of the Dockerfile.
1313

1414
# Porter targets linux/amd64 by default. Change the --platform flag to target a different platform
15-
FROM --platform=linux/amd64 debian:stretch-slim
15+
FROM --platform=linux/amd64 debian:stable-slim
1616

1717
# PORTER_INIT
1818

tests/integration/testdata/bundles/exec-outputs/Dockerfile.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:stretch-slim
1+
FROM debian:stable-slim
22

33
ARG BUNDLE_DIR
44

tests/integration/testdata/bundles/outputs-example/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:stretch-slim
1+
FROM debian:stable-slim
22

33
ARG BUNDLE_DIR
44

tests/testdata/mybuns/Dockerfile.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile-upstream:1.4.0
2-
FROM debian:stretch-slim
2+
FROM debian:stable-slim
33

44
ARG BUNDLE_DIR
55

workshop/asciiart/Dockerfile.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.11-stretch
1+
FROM golang:latest
22

33
ARG BUNDLE_DIR
44

workshop/asciiart/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ convert cute pictures of gophers into ASCII art when you install the bundle.
66
Here are some hints so that you can try to solve it in your own way.
77
For the full solution, see the [asciiart][asciiart] directory in the workshop materials.
88

9-
* A good base image for go is `golang:1.11-stretch`.
9+
* A good base image for go is `golang:latest`.
1010
* You need to run `porter build` after modifying the Dockerfile.tmpl to rebuild
1111
your invocation image to pick up your changes.
1212
* Don't forget to copy your images into your invocation image to /cnab/app/.

0 commit comments

Comments
 (0)