Backport use docker-java 3.0.x for launch tests
Backport commit d439b73758 to upgrade launch integration tests to
use docker-java 3.0.x.
This commit is contained in:
@@ -4,19 +4,20 @@ This module contains integration tests for the default launch script that is use
|
||||
to make a jar file fully executable on Linux. The tests use Docker to verify the
|
||||
functionality in a variety of Linux distributions.
|
||||
|
||||
== Setting up Docker
|
||||
|
||||
|
||||
== Setting up Docker
|
||||
The setup that's required varies depending on your operating system.
|
||||
|
||||
=== Docker on OS X
|
||||
|
||||
The latest version of Docker runs as a native Mac application but isn't supported by
|
||||
docker-java. This means that you should use Docker Toolbox. See the
|
||||
https://docs.docker.com/engine/installation/mac/[OS X installation instructions] for
|
||||
details.
|
||||
|
||||
=== Docker on OS X
|
||||
Install Docker for Mac. See the https://docs.docker.com/docker-for-mac/install/[macOS
|
||||
installation instructions] for details.
|
||||
|
||||
|
||||
|
||||
=== Docker on Linux
|
||||
|
||||
Install Docker as appropriate for your Linux distribution. See the
|
||||
https://docs.docker.com/engine/installation/[Linux installation instructions] for more
|
||||
information.
|
||||
@@ -30,32 +31,9 @@ $ sudo usermod -a -G docker awilkinson
|
||||
You may need to log out and back in again for this change to take affect and for your
|
||||
user to be able to connect to the daemon.
|
||||
|
||||
== Preparing to run the tests
|
||||
|
||||
Before running the tests, you must prepare your environment according to your operating
|
||||
system.
|
||||
|
||||
=== Preparation on OS X
|
||||
|
||||
The tests must be run in an environment where various environment variables including
|
||||
`DOCKER_HOST` and `DOCKER_CERT_PATH` have been set:
|
||||
|
||||
----
|
||||
$ eval $(docker-machine env default)
|
||||
----
|
||||
|
||||
=== Preparation on Linux
|
||||
|
||||
Docker Daemon's default configuration on Linux uses a Unix socket for communication.
|
||||
However, Docker's Java client uses HTTP by default. Docker Java's client can be configured
|
||||
to use the Unix socket via the `DOCKER_URL` environment variable:
|
||||
|
||||
----
|
||||
$ export DOCKER_URL=unix:///var/run/docker.sock
|
||||
----
|
||||
|
||||
== Running the tests
|
||||
|
||||
You're now ready to run the tests. Assuming that you're in the same directory as this
|
||||
README, the tests can be launched as follows:
|
||||
|
||||
@@ -69,8 +47,9 @@ connection. Subsequent runs will be faster as the images are cached locally. You
|
||||
`docker images` to see a list of the cached images. Images created by these tests will be
|
||||
tagged with `spring-boot-it` prefix to easily distinguish them.
|
||||
|
||||
== Cleaning up
|
||||
|
||||
|
||||
== Cleaning up
|
||||
If you want to reclaim the disk space used by the cached images (at the expense of having
|
||||
to wait for them to be downloaded and rebuilt the next time you run the tests), you can
|
||||
use `docker images` to list the images and `docker rmi <image>` to delete them (look for
|
||||
|
||||
Reference in New Issue
Block a user