Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Use public ecr for images
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Jellick <craig@acorn.io>
  • Loading branch information
cjellick committed Nov 16, 2022
1 parent 05ee141 commit 158a25c
Show file tree
Hide file tree
Showing 32 changed files with 48 additions and 48 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

FROM tonistiigi/binfmt:qemu-v6.2.0 AS binfmt
FROM moby/buildkit:v0.10.6 AS buildkit
FROM registry:2.8.1 AS registry
FROM public.ecr.aws/docker/library/registry:2.8.1 AS registry
FROM rancher/klipper-lb:v0.3.5 AS klipper-lb

FROM golang:1.19-alpine AS helper
FROM public.ecr.aws/docker/library/golang:1.19-alpine AS helper
WORKDIR /usr/src
RUN apk -U add curl
RUN curl -sfL https://github.com/loft-sh/devspace/archive/refs/tags/v5.18.5.tar.gz | tar xvzf - --strip-components=1
RUN --mount=type=cache,target=/go/pkg --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 go build -o /usr/local/bin/acorn-helper -ldflags "-s -w" ./helper

FROM golang:1.19 AS build
FROM public.ecr.aws/docker/library/golang:1.19 AS build
COPY / /src
WORKDIR /src
RUN --mount=type=cache,target=/go/pkg --mount=type=cache,target=/root/.cache/go-build make build

FROM nginx:1.23.2-alpine AS base
FROM public.ecr.aws/nginx/nginx:1.23.2-alpine AS base
RUN apk add --no-cache ca-certificates iptables ip6tables fuse3 git openssh pigz xz \
&& ln -s fusermount3 /usr/bin/fusermount
RUN adduser -D acorn
Expand Down
2 changes: 1 addition & 1 deletion integration/build/testdata/build-default/Acornfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ args: {
profiles: build: include: bool | *true

if args.include {
containers: default: image: "busybox"
containers: default: image: "public.ecr.aws/docker/library/busybox:latest"
}
4 changes: 2 additions & 2 deletions integration/build/testdata/contextdir/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM busybox AS not-default
FROM public.ecr.aws/docker/library/busybox:latest AS not-default

FROM busybox
FROM public.ecr.aws/docker/library/busybox:latest
COPY this-will-fail /
2 changes: 1 addition & 1 deletion integration/build/testdata/jobs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM busybox
FROM public.ecr.aws/docker/library/busybox:latest
2 changes: 1 addition & 1 deletion integration/build/testdata/jobs/Dockerfile.sidecar
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM busybox
FROM public.ecr.aws/docker/library/busybox:latest
CMD ["sidecar"]
2 changes: 1 addition & 1 deletion integration/build/testdata/sidecar/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM busybox
FROM public.ecr.aws/docker/library/busybox:latest
2 changes: 1 addition & 1 deletion integration/build/testdata/sidecar/Dockerfile.sidecar
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM busybox
FROM public.ecr.aws/docker/library/busybox:latest
CMD ["sidecar"]
2 changes: 1 addition & 1 deletion integration/build/testdata/similar/one/Acornfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file must match its sibling except for the value of index.txt
containers: {
web: {
image: "busybox"
image: "public.ecr.aws/docker/library/busybox:latest"
files: {
"/foo/index.txt": "1"
}
Expand Down
2 changes: 1 addition & 1 deletion integration/build/testdata/similar/two/Acornfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file must match its sibling except for the value of index.txt
containers: {
web: {
image: "busybox"
image: "public.ecr.aws/docker/library/busybox:latest"
files: {
"/foo/index.txt": "2"
}
Expand Down
4 changes: 2 additions & 2 deletions integration/build/testdata/simple-two/Acornfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ containers: {
build: images.itwo.build
}
three: {
image: "busybox"
image: "public.ecr.aws/docker/library/busybox:latest"
}
}

Expand All @@ -21,6 +21,6 @@ images: {
}
}
three: {
image: "busybox"
image: "public.ecr.aws/docker/library/busybox:latest"
}
}
2 changes: 1 addition & 1 deletion integration/build/testdata/simple-two/one/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM busybox
FROM public.ecr.aws/docker/library/busybox:latest
COPY data.txt /
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM busybox
FROM public.ecr.aws/docker/library/busybox:latest
COPY data.txt /
2 changes: 1 addition & 1 deletion integration/build/testdata/simple/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM busybox
FROM public.ecr.aws/docker/library/busybox:latest
4 changes: 2 additions & 2 deletions integration/build/testdata/target/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM busybox AS not-default
FROM public.ecr.aws/docker/library/busybox:latest AS not-default

FROM busybox
FROM public.ecr.aws/docker/library/busybox:latest
COPY this-will-fail /
2 changes: 1 addition & 1 deletion integration/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,6 @@ func TestFriendlyNameInContainer(t *testing.T) {

_, img, _ := strings.Cut(image.ImageData.Containers["default"].Image, "@")
assert.Len(t, cs, 1)
assert.Equal(t, "nginx", cs[0].Spec.Image)
assert.Equal(t, "public.ecr.aws/nginx/nginx:latest", cs[0].Spec.Image)
assert.True(t, strings.HasSuffix(cs[0].Status.ImageID, img))
}
10 changes: 5 additions & 5 deletions integration/client/testdata/dependson/Acornfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
containers: {
one: {
image: "nginx"
image: "public.ecr.aws/nginx/nginx:latest"
ports: "80/http"
dependsOn: ["job1", "job2"]
}
two: {
image: "nginx"
image: "public.ecr.aws/nginx/nginx:latest"
ports: "80/http"
dependsOn: "one"
}
three: {
image: "nginx"
image: "public.ecr.aws/nginx/nginx:latest"
ports: "80/http"
dependsOn: "two"
}
}

jobs: {
job1: {
image:"busybox"
image:"public.ecr.aws/docker/library/busybox:latest"
command: "/bin/true"
dependsOn: "job2"
}
job2: {
image:"busybox"
image:"public.ecr.aws/docker/library/busybox:latest"
command: "/bin/true"
}
}
2 changes: 1 addition & 1 deletion integration/client/testdata/nginx/Acornfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
containers: default: image: "nginx"
containers: default: image: "public.ecr.aws/nginx/nginx:latest"
containers: default: dirs: "/usr/share/www": "vol"
2 changes: 1 addition & 1 deletion integration/client/testdata/nginx2/Acornfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
containers: nginx2: image: "nginx"
containers: nginx2: image: "public.ecr.aws/nginx/nginx:latest"
containers: nginx2: dirs: "/usr/share/www": "vol"
4 changes: 2 additions & 2 deletions integration/dev/dev_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ const (
containers: default: build: {}
`
dockerfile1 = `
FROM busybox
FROM public.ecr.aws/docker/library/busybox:latest
CMD ["echo", "hi"]`
dockerfile2 = `
FROM busybox
FROM public.ecr.aws/docker/library/busybox:latest
CMD ["echo", "bye"]`
)

Expand Down
8 changes: 4 additions & 4 deletions integration/log/testdata/Acornfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
containers: {
"cont1-1": {
image: "busybox"
image: "public.ecr.aws/docker/library/busybox:latest"
command: [
"sh", "-c", "echo -e \"line 1-1\nline 1-2\"; sleep 9999"
]
sidecars: "cont2-1": {
image: "busybox"
image: "public.ecr.aws/docker/library/busybox:latest"
command: [
"sh", "-c", "echo -e \"line 1-3\nline 1-4\"; sleep 9999"
]
}
}
"cont1-2": {
image: "busybox"
image: "public.ecr.aws/docker/library/busybox:latest"
command: [
"sh", "-c", "echo -e \"line 2-1\nline 2-2\"; sleep 9999"
]
sidecars: "cont2-2": {
image: "busybox"
image: "public.ecr.aws/docker/library/busybox:latest"
command: [
"sh", "-c", "echo -e \"line 2-3\nline 2-4\"; sleep 9999"
]
Expand Down
2 changes: 1 addition & 1 deletion integration/run/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func TestImageNameAnnotation(t *testing.T) {
}

_, digest, _ := strings.Cut(pod.Spec.Containers[0].Image, "sha256:")
return mapping["sha256:"+digest] == "nginx"
return mapping["sha256:"+digest] == "public.ecr.aws/nginx/nginx:latest"
})
}

Expand Down
2 changes: 1 addition & 1 deletion integration/run/testdata/named/Acornfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
containers: default: image: "nginx"
containers: default: image: "public.ecr.aws/nginx/nginx:latest"
2 changes: 1 addition & 1 deletion integration/run/testdata/params/Acornfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ containers: {
env: {
arg: "\(args.someInt)"
}
image: "nginx"
image: "public.ecr.aws/nginx/nginx:latest"
}
}
2 changes: 1 addition & 1 deletion integration/run/testdata/simple/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM nginx
FROM public.ecr.aws/nginx/nginx:latest
2 changes: 1 addition & 1 deletion integration/run/testdata/volume/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM nginx
FROM public.ecr.aws/nginx/nginx:latest
2 changes: 1 addition & 1 deletion integration/secrets/testdata/encryption/Acornfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
args: encdata: ""

containers: app: {
image: "busybox"
image: "public.ecr.aws/docker/library/busybox:latest"
env: secretVal: "secret://test/key"
}

Expand Down
2 changes: 1 addition & 1 deletion integration/secrets/testdata/generated-json/Acornfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs: {
env: {
PASS: "secret://zzz/password"
}
image: "busybox"
image: "public.ecr.aws/docker/library/busybox:latest"
files: "/run.sh": """
#!/bin/sh
cat << EOF > /run/secrets/output
Expand Down
2 changes: 1 addition & 1 deletion integration/secrets/testdata/generated/Acornfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs: {
env: {
PASS: "secret://zzz/password"
}
image: "busybox"
image: "public.ecr.aws/docker/library/busybox:latest"
cmd: ["sh", "-c", "echo -n $PASS > /run/secrets/output"]
}
cronpass: {schedule: "* * * * * "} & pass
Expand Down
2 changes: 1 addition & 1 deletion integration/secrets/testdata/issue-552/Acornfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
containers: {
"icinga2-master": {
image: "nginx"
image: "public.ecr.aws/nginx/nginx:latest"
dirs: {
"/data/var": "volume://icinga-data"
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/appdefinition/appdefinition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ containers: {
build: {}
}
right: {
image: "nginx"
image: "public.ecr.aws/nginx/nginx:latest"
dirs: "/var/tmp": "./foo/bar"
}
}
Expand Down Expand Up @@ -201,9 +201,9 @@ images: {
assert.Equal(t, "Dockerfile", buildSpec.Containers["file"].Sidecars["left"].Build.Dockerfile)
assert.Equal(t, ".", buildSpec.Containers["file"].Sidecars["left"].Build.Context)

assert.Equal(t, "nginx", buildSpec.Containers["file"].Sidecars["right"].Image)
assert.Equal(t, "public.ecr.aws/nginx/nginx:latest", buildSpec.Containers["file"].Sidecars["right"].Image)
assert.Equal(t, "Dockerfile", buildSpec.Containers["file"].Sidecars["right"].Build.Dockerfile)
assert.Equal(t, "nginx", buildSpec.Containers["file"].Sidecars["right"].Build.BaseImage)
assert.Equal(t, "public.ecr.aws/nginx/nginx:latest", buildSpec.Containers["file"].Sidecars["right"].Build.BaseImage)
assert.Equal(t, ".", buildSpec.Containers["file"].Sidecars["right"].Build.Context)
assert.Equal(t, "./foo/bar", buildSpec.Containers["file"].Sidecars["right"].Build.ContextDirs["/var/tmp"])

Expand Down
2 changes: 1 addition & 1 deletion pkg/appdefinition/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ profiles: {
containers: {
web: {
image: "nginx"
image: "public.ecr.aws/nginx/nginx:latest"
scale: args.replicas
}
}`)
Expand Down
2 changes: 1 addition & 1 deletion pkg/appdefinition/std_test.cue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
containers: default: {
image: "nginx"
image: "public.ecr.aws/nginx/nginx:latest"
files: "a": std.toYAML(localData)
}

Expand Down

0 comments on commit 158a25c

Please sign in to comment.