Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 66f9009

Browse files
authored
Merge pull request #1550 from docker/local-test-cleanup
Local test cleanup
2 parents 9f23d9e + 02b9363 commit 66f9009

File tree

21 files changed

+60
-75
lines changed

21 files changed

+60
-75
lines changed

aci/e2e/aci-demo/web/Dockerfile

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
# BUILD
15-
FROM ubuntu:latest
16-
17-
# Update and upgrade repo
18-
RUN apt-get update -y -q && apt-get upgrade -y -q
19-
20-
# Install tools we might need
21-
RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -q curl build-essential ca-certificates git
22-
23-
# Download Go 1.2.2 and install it to /usr/local/go
24-
RUN curl -s https://storage.googleapis.com/golang/go1.2.2.linux-amd64.tar.gz| tar -v -C /usr/local -xz
25-
26-
# Let's people find our Go binaries
27-
ENV PATH $PATH:/usr/local/go/bin
28-
15+
FROM golang:1.16-alpine AS build
2916
COPY dispatcher.go .
30-
RUN go build dispatcher.go
17+
RUN mkdir -p /out && go build -o /out/dispatcher dispatcher.go
3118

19+
FROM alpine AS run
3220
EXPOSE 80
3321
CMD ["/dispatcher"]
34-
3522
COPY static /static/
23+
COPY --from=build /out/dispatcher /dispatcher

aci/e2e/aci_secrets_resources/web/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
FROM golang:1.16-alpine AS build
1919
COPY main.go .
2020
RUN --mount=type=cache,target=/go/pkg/mod \
21-
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o server main.go
21+
go build -trimpath -ldflags="-s -w" -o server main.go
2222

2323
FROM alpine
2424
RUN apk --no-cache add curl

local/e2e/compose/compose_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func TestAttachRestart(t *testing.T) {
145145
c := NewParallelE2eCLI(t, binDir)
146146

147147
res := c.RunDockerOrExitError("compose", "--ansi=never", "--project-directory", "./fixtures/attach-restart", "up")
148-
defer c.RunDockerCmd("compose", "-p", "attach-restart", "down")
148+
defer c.RunDockerOrExitError("compose", "-p", "attach-restart", "down")
149149
output := res.Stdout()
150150

151151
exitRegex := regexp.MustCompile("another_1 exited with code 1")
@@ -159,7 +159,7 @@ func TestInitContainer(t *testing.T) {
159159
c := NewParallelE2eCLI(t, binDir)
160160

161161
res := c.RunDockerOrExitError("compose", "--ansi=never", "--project-directory", "./fixtures/init-container", "up")
162-
defer c.RunDockerCmd("compose", "-p", "init-container", "down")
162+
defer c.RunDockerOrExitError("compose", "-p", "init-container", "down")
163163
output := res.Stdout()
164164

165165
assert.Assert(t, strings.Contains(output, "foo_1 | hello\nbar_1 | world"), res.Combined())

local/e2e/compose/fixtures/attach-restart/compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
services:
22
simple:
3-
image: busybox:1.31.0-uclibc
3+
image: alpine
44
command: sh -c "sleep 5"
55
another:
6-
image: busybox:1.31.0-uclibc
6+
image: alpine
77
command: sh -c "sleep 0.1 && echo world && /bin/false"
88
deploy:
99
restart_policy:

local/e2e/compose/fixtures/build-test/nginx-build/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM nginx
15+
FROM nginx:alpine
1616

1717
ARG FOO
1818
LABEL FOO=$FOO

local/e2e/compose/fixtures/build-test/nginx-build2/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM nginx
15+
FROM nginx:alpine
1616

1717
COPY static2 /usr/share/nginx/html
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22
should_fail:
3-
image: busybox:1.27.2
3+
image: alpine
44
command: ls /does_not_exist
55
sleep: # will be killed
6-
image: busybox:1.27.2
6+
image: alpine
77
command: ping localhost
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
services:
22
service:
3-
image: busybox
3+
image: alpine
44
command: top
55
ipc: "service:shareable"
66
container:
7-
image: busybox
7+
image: alpine
88
command: top
99
ipc: "container:ipc_mode_container"
1010
shareable:
11-
image: busybox
11+
image: alpine
1212
command: top
1313
ipc: shareable
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22
ping:
3-
image: busybox:1.27.2
3+
image: alpine
44
command: ping localhost -c 1
55
hello:
6-
image: busybox:1.31.0-uclibc
6+
image: alpine
77
command: echo hello

local/e2e/compose/fixtures/network-test/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
mydb:
3-
image: mysql
3+
image: mariadb
44
network_mode: "service:db"
55
environment:
66
- MYSQL_ALLOW_EMPTY_PASSWORD=yes

0 commit comments

Comments
 (0)