Skip to content

Commit 37e67fe

Browse files
#430: Add dockerfiles
1 parent ed6e3cd commit 37e67fe

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

core/jvm/test/testcontainers/TimeZoneTest.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,23 @@ package testcontainers
77

88
import kotlinx.datetime.*
99
import org.testcontainers.junit.jupiter.Testcontainers
10+
import java.nio.file.Paths
11+
import java.nio.file.Files
1012
import kotlin.test.Test
1113
import kotlin.test.assertNotEquals
1214

1315
@Testcontainers
1416
class TimeZoneTest {
17+
1518
@Test
1619
fun test() {
1720
val tz = TimeZone.currentSystemDefault()
1821
assertNotEquals(TimeZone.UTC, tz)
1922
println("System time zone: $tz")
23+
24+
val filePath = Paths.get("./jvm/test/testcontainers/original/Dockerfile")
25+
val content = String(Files.readAllBytes(filePath), Charsets.UTF_8)
26+
println("Dockerfile content: \n$content")
27+
2028
}
2129
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM --platform=linux/amd64 ubuntu:24.04
2+
3+
RUN apt-get update && apt-get install -y tzdata
4+
5+
# 4: Arctic/Longyearbyen
6+
RUN echo 4 | dpkg-reconfigure tzdata
7+
8+
# Modification like in Debian Jessie
9+
RUN rm /etc/localtime
10+
RUN cp /usr/share/zoneinfo/$(cat /etc/timezone) /etc/localtime
11+
12+
WORKDIR /app
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM --platform=linux/amd64 ubuntu:24.04
2+
3+
RUN apt-get update && apt-get install -y tzdata
4+
5+
# 4: Arctic/Longyearbyen
6+
RUN echo 4 | dpkg-reconfigure tzdata
7+
8+
WORKDIR /app

0 commit comments

Comments
 (0)