Skip to content

DateTimeParseException when trying to launch container #3054

@acanda

Description

@acanda

When Testcontainers is refreshing its local image cache, it is using the command "inspect image" and parses the timestamp of the attribute "created". If this timestamp contains a time zone offset, then the following exception is thrown and Testcontainers fails to launch the container.

org.testcontainers.containers.ContainerLaunchException: Container startup failed
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=docker-registry.example.org/some/image:1.0, imagePullPolicy=DefaultPullPolicy())
Caused by: java.time.format.DateTimeParseException: Text '2020-07-24T07:17:51.365190246+02:00' could not be parsed at index 29

This happend with Docker version 18.06.3 on Linux.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions