@@ -0,0 +1,1299 @@
+package pl.domzal.junit.docker.rule.examples;%0A%0Aimport static org.hamcrest.CoreMatchers.containsString;%0Aimport static org.junit.Assert.assertThat;%0A%0Aimport org.junit.ClassRule;%0Aimport org.junit.Test;%0Aimport org.junit.experimental.categories.Category;%0Aimport org.junit.rules.RuleChain;%0A%0Aimport pl.domzal.junit.docker.rule.DockerRule;%0A%0A/**%0A * Container linking example. &quot;web&quot; links to &quot;db&quot; and pings it.%0A */%0A@Category(test.category.Stable.class)%0Apublic class ExampleLinkTest %7B%0A%0A    private static DockerRule db = DockerRule.builder()//%0A            .imageName(%22alpine%22)//%0A            .name(%22db%22)//%0A            .cmd(%22sh%22, %22-c%22, %22sleep 100%22)//%0A            .build();%0A%0A    private static DockerRule web = DockerRule.builder()//%0A            .imageName(%22alpine%22)//%0A            .link(%22db%22)//%0A            .cmd(%22sh%22, %22-c%22, %22ping -w 1 db%22)//%0A            .build();%0A%0A    /**%0A     * Recommended method to make linked container are initialized in required order.%0A     */%0A    @ClassRule%0A    public static RuleChain containersChain = RuleChain.outerRule(db).around(web);%0A%0A    @Test%0A    public void shouldPassEnvVariables() throws Throwable %7B%0A        web.waitForExit();%0A        String containerOutput = web.getLog();%0A        assertThat(containerOutput, containsString(%221 packets received%22));%0A    %7D%0A%0A%7D%0A

add #23 container linking example