Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update alpine image version to 3.17 #8476

Merged
merged 3 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static Map<String, String> markerLabels() {
return Collections.unmodifiableMap(labels);
}

private static final DockerImageName TINY_IMAGE = DockerImageName.parse("alpine:3.16");
private static final DockerImageName TINY_IMAGE = DockerImageName.parse("alpine:3.17");

private static DockerClientFactory instance;

Expand Down
4 changes: 2 additions & 2 deletions core/src/test/java/org/testcontainers/TestImages.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public interface TestImages {
DockerImageName REDIS_IMAGE = DockerImageName.parse("redis:3.0.2");
DockerImageName RABBITMQ_IMAGE = DockerImageName.parse("rabbitmq:3.5.3");
DockerImageName MONGODB_IMAGE = DockerImageName.parse("mongo:3.1.5");
DockerImageName ALPINE_IMAGE = DockerImageName.parse("alpine:3.16");
DockerImageName ALPINE_IMAGE = DockerImageName.parse("alpine:3.17");
DockerImageName DOCKER_REGISTRY_IMAGE = DockerImageName.parse("registry:2.7.0");
DockerImageName TINY_IMAGE = DockerImageName.parse("alpine:3.16");
DockerImageName TINY_IMAGE = DockerImageName.parse("alpine:3.17");
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ public void shouldGetDependencyImagesWhenOverriding() {
)
);
assertThat(dockerComposeFiles.getDependencyImages())
.containsExactlyInAnyOrder("alpine:3.16", "redis:b", "mysql:b", "aservice:latest");
.containsExactlyInAnyOrder("alpine:3.17", "redis:b", "mysql:b", "aservice:latest");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public void shouldReturnTheProvidedImage() {
GenericContainer container = new GenericContainer(TestImages.REDIS_IMAGE);
assertThat(container.getImage().get()).isEqualTo("redis:3.0.2");
container.setImage(new RemoteDockerImage(TestImages.ALPINE_IMAGE));
assertThat(container.getImage().get()).isEqualTo("alpine:3.16");
assertThat(container.getImage().get()).isEqualTo("alpine:3.17");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ public void shouldObtainImageFromDockerfileBuild() {
.contains(
entry("mysql", Sets.newHashSet("mysql")),
entry("redis", Sets.newHashSet("redis")),
entry("custom", Sets.newHashSet("alpine:3.16"))
); // r/ redis, mysql from compose file, alpine:3.16 from Dockerfile build
entry("custom", Sets.newHashSet("alpine:3.17"))
); // r/ redis, mysql from compose file, alpine:3.17 from Dockerfile build
}

@Test
Expand All @@ -126,7 +126,7 @@ public void shouldObtainImageFromDockerfileBuildWithContext() {
.contains(
entry("mysql", Sets.newHashSet("mysql")),
entry("redis", Sets.newHashSet("redis")),
entry("custom", Sets.newHashSet("alpine:3.16"))
); // redis, mysql from compose file, alpine:3.16 from Dockerfile build
entry("custom", Sets.newHashSet("alpine:3.17"))
); // redis, mysql from compose file, alpine:3.17 from Dockerfile build
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class ToStringConsumerTest {

@Test
public void newlines_are_not_added_to_exec_output() throws Exception {
try (GenericContainer<?> container = new GenericContainer<>("alpine:3.16")) {
try (GenericContainer<?> container = new GenericContainer<>("alpine:3.17")) {
container.withCommand("sleep", "2m");
container.start();

Expand All @@ -34,7 +34,7 @@ public void newlines_are_not_added_to_exec_output() throws Exception {

@Test(timeout = 60_000L)
public void newlines_are_not_added_to_exec_output_with_tty() throws Exception {
try (GenericContainer<?> container = new GenericContainer<>("alpine:3.16")) {
try (GenericContainer<?> container = new GenericContainer<>("alpine:3.17")) {
container.withCreateContainerCmdModifier(cmd -> {
cmd.withAttachStdin(true).withStdinOpen(true).withTty(true);
});
Expand All @@ -48,7 +48,7 @@ public void newlines_are_not_added_to_exec_output_with_tty() throws Exception {

@Test
public void newlines_are_not_added_to_container_output() {
try (GenericContainer<?> container = new GenericContainer<>("alpine:3.16")) {
try (GenericContainer<?> container = new GenericContainer<>("alpine:3.17")) {
container.withCommand("echo", "-n", LARGE_PAYLOAD);
container.setStartupCheckStrategy(new OneShotStartupCheckStrategy());
container.start();
Expand All @@ -61,7 +61,7 @@ public void newlines_are_not_added_to_container_output() {

@Test
public void newlines_are_not_added_to_container_output_with_tty() {
try (GenericContainer<?> container = new GenericContainer<>("alpine:3.16")) {
try (GenericContainer<?> container = new GenericContainer<>("alpine:3.17")) {
container.withCreateContainerCmdModifier(cmd -> {
cmd.withTty(true);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class ImagePullTest {
public static String[] parameters() {
return new String[] {
"alpine:latest",
"alpine:3.16",
"alpine:3.17",
"alpine", // omitting the tag should work and default to latest
"alpine@sha256:1775bebec23e1f3ce486989bfc9ff3c4e951690df84aa9f926497d82f2ffca9d",
"quay.io/testcontainers/ryuk:latest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected void configure(BuildImageCmd buildImageCmd) {
super.configure(buildImageCmd);

List<String> dockerfile = Arrays.asList(
"FROM alpine:3.16",
"FROM alpine:3.17",
"RUN echo 'hello from Docker build process'",
"CMD yes"
);
Expand All @@ -58,7 +58,7 @@ public void dockerfileBuilderWorks() {
.withFileFromString("folder/someFile.txt", "hello")
.withDockerfileFromBuilder(builder -> {
builder
.from("alpine:3.16")
.from("alpine:3.17")
.workDir("/app")
.add("test.txt", "test file.txt")
.run("ls", "-la", "/app/test file.txt")
Expand Down Expand Up @@ -101,7 +101,7 @@ public int getFileMode() {
)
.withDockerfileFromBuilder(builder -> {
builder
.from("alpine:3.16") //
.from("alpine:3.17") //
.copy("someFile.txt", "/someFile.txt")
.cmd("stat -c \"%a\" /someFile.txt");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
public class FixedHostPortContainerTest {

private static final String TEST_IMAGE = "alpine:3.16";
private static final String TEST_IMAGE = "alpine:3.17";

/**
* Default http server port (just something different from default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void simpleRecursiveFileTest() {
new ImageFromDockerfile()
.withDockerfileFromBuilder(builder -> {
builder
.from("alpine:3.16")
.from("alpine:3.17")
.copy("/tmp/foo", "/foo")
.cmd("cat /foo/test/resources/test-recursive-file.txt")
.build();
Expand All @@ -47,7 +47,7 @@ public void simpleRecursiveFileWithPermissionTest() {
new ImageFromDockerfile()
.withDockerfileFromBuilder(builder -> {
builder
.from("alpine:3.16") //
.from("alpine:3.17") //
.copy("/tmp/foo", "/foo")
.cmd("ls", "-al", "/")
.build();
Expand Down Expand Up @@ -75,7 +75,7 @@ public void simpleRecursiveClasspathResourceTest() {
new ImageFromDockerfile()
.withDockerfileFromBuilder(builder -> {
builder
.from("alpine:3.16") //
.from("alpine:3.17") //
.copy("/tmp/foo", "/foo")
.cmd("ls -lRt /foo")
.build();
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/resources/compose-dockerfile/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.16
FROM alpine:3.17

ADD passthrough.sh /passthrough.sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ services:
redis:
image: redis
other:
image: alpine:3.16
image: alpine:3.17
command: sleep 10000
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class ContainerCreationTest {
// }
// spotless:on

public static final DockerImageName ALPINE_IMAGE = DockerImageName.parse("alpine:3.16");
public static final DockerImageName ALPINE_IMAGE = DockerImageName.parse("alpine:3.17");

// spotless:off
// withOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
public class ContainerLabelTest {

// single_label {
public GenericContainer containerWithLabel = new GenericContainer(DockerImageName.parse("alpine:3.16"))
public GenericContainer containerWithLabel = new GenericContainer(DockerImageName.parse("alpine:3.17"))
.withLabel("key", "value");
// }

// multiple_labels {
private Map<String, String> mapOfLabels = new HashMap<>();
// populate map, e.g. mapOfLabels.put("key1", "value1");

public GenericContainer containerWithMultipleLabels = new GenericContainer(DockerImageName.parse("alpine:3.16"))
public GenericContainer containerWithMultipleLabels = new GenericContainer(DockerImageName.parse("alpine:3.17"))
.withLabels(mapOfLabels);
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public class ExecTest {

@Rule
public GenericContainer<?> container = new GenericContainer<>(DockerImageName.parse("alpine:3.16"))
public GenericContainer<?> container = new GenericContainer<>(DockerImageName.parse("alpine:3.17"))
.withCommand("top");

@Test
Expand Down
2 changes: 1 addition & 1 deletion docs/features/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Some companies disallow the usage of Docker Hub, but you can override `*.image`
> **ryuk.container.image = testcontainers/ryuk:0.3.3**
> Performs fail-safe cleanup of containers, and always required (unless [Ryuk is disabled](#disabling-ryuk))

> **tinyimage.container.image = alpine:3.16**
> **tinyimage.container.image = alpine:3.17**
> Used to check whether images can be pulled at startup, and always required (unless [startup checks are disabled](#disabling-the-startup-checks))

> **sshd.container.image = testcontainers/sshd:1.1.0**
Expand Down
2 changes: 1 addition & 1 deletion docs/features/creating_images.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ new GenericContainer(
new ImageFromDockerfile()
.withDockerfileFromBuilder(builder ->
builder
.from("alpine:3.16")
.from("alpine:3.17")
.run("apk add --update nginx")
.cmd("nginx", "-g", "daemon off;")
.build()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ interface SpockTestImages {
DockerImageName MYSQL_IMAGE = DockerImageName.parse("mysql:8.0.36")
DockerImageName POSTGRES_TEST_IMAGE = DockerImageName.parse("postgres:9.6.12")
DockerImageName HTTPD_IMAGE = DockerImageName.parse("httpd:2.4-alpine")
DockerImageName TINY_IMAGE = DockerImageName.parse("alpine:3.16")
DockerImageName TINY_IMAGE = DockerImageName.parse("alpine:3.17")
}
Loading