Skip to content

Commit

Permalink
Use debian only for base image (#517)
Browse files Browse the repository at this point in the history
Install ca-certificates using apt instead of copying from another base
image to not have to download multiple base images.
  • Loading branch information
carolynvs-msft authored and jeremyrickard committed Aug 14, 2019
1 parent fb4fa4c commit f095b38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pkg/porter/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ func TestPorter_buildDockerfile(t *testing.T) {
require.NoError(t, err)

wantlines := []string{
"FROM quay.io/deis/lightweight-docker-go:v0.2.0",
"FROM debian:stretch",
"COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt",
"",
"ARG BUNDLE_DIR",
"",
"RUN apt-get update && apt-get install -y ca-certificates",
"",
"COPY .cnab /cnab",
"COPY . $BUNDLE_DIR",
"RUN rm -fr $BUNDLE_DIR/.cnab",
Expand Down Expand Up @@ -99,12 +99,12 @@ func TestPorter_buildDockerfile_output(t *testing.T) {

wantlines := `
Generating Dockerfile =======>
FROM quay.io/deis/lightweight-docker-go:v0.2.0
FROM debian:stretch
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
ARG BUNDLE_DIR
RUN apt-get update && apt-get install -y ca-certificates
COPY .cnab /cnab
COPY . $BUNDLE_DIR
RUN rm -fr $BUNDLE_DIR/.cnab
Expand Down
4 changes: 2 additions & 2 deletions pkg/porter/templates/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM quay.io/deis/lightweight-docker-go:v0.2.0
FROM debian:stretch
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

ARG BUNDLE_DIR

RUN apt-get update && apt-get install -y ca-certificates

COPY .cnab /cnab
COPY . $BUNDLE_DIR
RUN rm -fr $BUNDLE_DIR/.cnab

0 comments on commit f095b38

Please sign in to comment.