Merge pull request #1535 from docker/revert-1533-e2e-test-improvements

Revert "E2e test improvements"
This commit is contained in:
Nicolas De loof 2021-04-13 17:15:31 +02:00 committed by GitHub
commit a95806712a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 39 additions and 27 deletions

View File

@ -12,12 +12,24 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# BUILD # BUILD
FROM golang:alpine AS build FROM ubuntu:latest
COPY dispatcher.go .
RUN mkdir -p /out && go build -o /out/dispatcher dispatcher.go # Update and upgrade repo
RUN apt-get update -y -q && apt-get upgrade -y -q
# Install tools we might need
RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -q curl build-essential ca-certificates git
# Download Go 1.2.2 and install it to /usr/local/go
RUN curl -s https://storage.googleapis.com/golang/go1.2.2.linux-amd64.tar.gz| tar -v -C /usr/local -xz
# Let's people find our Go binaries
ENV PATH $PATH:/usr/local/go/bin
COPY dispatcher.go .
RUN go build dispatcher.go
FROM alpine AS run
EXPOSE 80 EXPOSE 80
CMD ["/dispatcher"] CMD ["/dispatcher"]
COPY static /static/ COPY static /static/
COPY --from=build /out/dispatcher /dispatcher

View File

@ -1,9 +1,9 @@
services: services:
simple: simple:
image: alpine image: busybox:1.31.0-uclibc
command: sh -c "sleep 5" command: sh -c "sleep 5"
another: another:
image: alpine image: busybox:1.31.0-uclibc
command: sh -c "sleep 0.1 && echo world && /bin/false" command: sh -c "sleep 0.1 && echo world && /bin/false"
deploy: deploy:
restart_policy: restart_policy:

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM nginx:alpine FROM nginx
ARG FOO ARG FOO
LABEL FOO=$FOO LABEL FOO=$FOO

View File

@ -12,6 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM nginx:alpine FROM nginx
COPY static2 /usr/share/nginx/html COPY static2 /usr/share/nginx/html

View File

@ -1,7 +1,7 @@
services: services:
should_fail: should_fail:
image: alpine image: busybox:1.27.2
command: ls /does_not_exist command: ls /does_not_exist
sleep: # will be killed sleep: # will be killed
image: alpine image: busybox:1.27.2
command: ping localhost command: ping localhost

View File

@ -1,13 +1,13 @@
services: services:
service: service:
image: alpine image: busybox
command: top command: top
ipc: "service:shareable" ipc: "service:shareable"
container: container:
image: alpine image: busybox
command: top command: top
ipc: "container:ipc_mode_container" ipc: "container:ipc_mode_container"
shareable: shareable:
image: alpine image: busybox
command: top command: top
ipc: shareable ipc: shareable

View File

@ -1,7 +1,7 @@
services: services:
ping: ping:
image: alpine image: busybox:1.27.2
command: ping localhost -c 1 command: ping localhost -c 1
hello: hello:
image: alpine image: busybox:1.31.0-uclibc
command: echo hello command: echo hello

View File

@ -1,6 +1,6 @@
services: services:
mydb: mydb:
image: mariadb image: mysql
network_mode: "service:db" network_mode: "service:db"
environment: environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes - MYSQL_ALLOW_EMPTY_PASSWORD=yes

View File

@ -1,4 +1,4 @@
services: services:
restart: restart:
image: alpine image: busybox
command: ash -c "if [[ -f /tmp/restart.lock ]] ; then sleep infinity; else touch /tmp/restart.lock; fi" command: ash -c "if [[ -f /tmp/restart.lock ]] ; then sleep infinity; else touch /tmp/restart.lock; fi"

View File

@ -8,13 +8,13 @@ services:
networks: networks:
- backnet - backnet
db: db:
image: nginx:alpine image: nginx
networks: networks:
- backnet - backnet
volumes: volumes:
- data:/test - data:/test
front: front:
image: nginx:alpine image: nginx
networks: networks:
- frontnet - frontnet
networks: networks:

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM nginx:alpine FROM nginx
ARG FOO ARG FOO
LABEL FOO=$FOO LABEL FOO=$FOO

View File

@ -1,7 +1,7 @@
services: services:
simple: simple:
image: alpine image: busybox:1.27.2
command: top command: top
another: another:
image: alpine image: busybox:1.31.0-uclibc
command: top command: top

View File

@ -1,5 +1,5 @@
services: services:
simple: simple:
image: nginx:alpine image: nginx
another: another:
image: nginx:alpine image: nginx

View File

@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM nginx:alpine FROM nginx

View File

@ -32,7 +32,7 @@ func TestIPC(t *testing.T) {
const projectName = "ipc_e2e" const projectName = "ipc_e2e"
var cid string var cid string
t.Run("create ipc mode container", func(t *testing.T) { t.Run("create ipc mode container", func(t *testing.T) {
res := c.RunDockerCmd("run", "-d", "--rm", "--ipc=shareable", "--name", "ipc_mode_container", "alpine", "top") res := c.RunDockerCmd("run", "-d", "--rm", "--ipc=shareable", "--name", "ipc_mode_container", "busybox", "top")
cid = strings.Trim(res.Stdout(), "\n") cid = strings.Trim(res.Stdout(), "\n")
}) })