【Docker】eclipse-temurin:19-jdk-alpineのイメージを-dオプションありでコンテナ起動するとIOException: Unable to parse columnsが発生する

### 【概要】
eclipse-temurin:19-jdk-alpineのイメージを-dオプションありでコンテナ起動すると`IOException: Unable to parse columns`が発生します。
-dオプションなしだと問題なく起動します。

### 【環境】
```terminal
C:\work>docker --version
Docker version 20.10.21, build baeda1f
```

### 【準備】
下記Dockerfileを作成します。
本記事ではC:\workに配置しています。

```docker:Dockerfile
FROM eclipse-temurin:19-jdk-alpine
```

### 【コマンド実行結果】

#### Dockerイメージ作成

```terminal
C:\work>docker build -t sample-image .
[+] Building 2.3s (5/5) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 73B                                                                                0.0s
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 2B                                                                                    0.0s
 => [internal] load metadata for docker.io/library/eclipse-temurin:19-jdk-alpine                                   2.2s
 => CACHED [1/1] FROM docker.io/library/eclipse-temurin:19-jdk-alpine@sha256:7e4fc4b3ae1bd8ed4205bfd76e4ebeefca39  0.0s
 => exporting to image                                                                                             0.0s
 => => exporting layers                                                                                            0.0s
 => => writing image sha256:510f70aedc7e3d91c80e34b5906bac404eeceb9e64a2026a773609100c5fc939                       0.0s
 => => naming to docker.io/library/sample-image                                                                    0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
```

#### Dockerコンテナ作成

##### 成功パターン（-dオプションなし）

```terminal
C:\work>docker run -it --name sample-container_success sample-image
Oct 14, 2023 1:24:55 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
|  Welcome to JShell -- Version 19.0.2
|  For an introduction type: /help intro

jshell>
```

##### 失敗パターン（-dオプションあり）
jshellが立ち上がらないのでログを確認すると`IOException: Unable to parse columns`が発生していることが分かります。

```terminal
C:\work>docker run -it -d --name sample-container_fail sample-image
6cf59d6b61f49bc45d41bbaf9b30bc9a23be3986999877f234ac5ea6a4be3813

C:\work>docker logs sample-container_fail
Oct 14, 2023 1:24:30 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
|  Welcome to JShell -- Version 19.0.2
|  For an introduction type: /help intro
Exception in thread "main" java.io.IOError: java.io.IOException: Unable to parse columns
        at jdk.internal.le/jdk.internal.org.jline.terminal.impl.AbstractPosixTerminal.getSize(AbstractPosixTerminal.java:62)
        at jdk.internal.le/jdk.internal.org.jline.terminal.Terminal.getBufferSize(Terminal.java:217)
        at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.doDisplay(LineReaderImpl.java:755)
        at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.<init>(LineReaderImpl.java:308)
        at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext$JShellLineReader.<init>(ConsoleIOContext.java:1426)
        at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.<init>(ConsoleIOContext.java:168)
        at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:988)
        at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.start(JShellToolBuilder.java:261)
        at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:120)
Caused by: java.io.IOException: Unable to parse columns
        at jdk.internal.le/jdk.internal.org.jline.terminal.impl.ExecPty.doGetInt(ExecPty.java:278)
        at jdk.internal.le/jdk.internal.org.jline.terminal.impl.ExecPty.doGetSize(ExecPty.java:263)
        at jdk.internal.le/jdk.internal.org.jline.terminal.impl.ExecPty.getSize(ExecPty.java:170)
        at jdk.internal.le/jdk.internal.org.jline.terminal.impl.AbstractPosixTerminal.getSize(AbstractPosixTerminal.java:60)
        ... 8 more

C:\work>
```