Skip to content

Commit c8ce61c

Browse files
committed
Updated README.md.
1 parent c783fb1 commit c8ce61c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,3 +303,26 @@ language – say, Python:
303303
run:
304304
print("Hello from Python script")
305305
```
306+
307+
### Docker for Windows
308+
309+
When authoring Windows container Dockerfiles, you may find the syntax of
310+
PowerShell or cmd.exe restrictive, especially if you are accustomed to POSIX
311+
shell environments.
312+
313+
In such cases, GNU-TK can be installed to provide a POSIX-compatible shell
314+
inside the container:
315+
316+
```dockerfile
317+
# Install GNU-TK (POSIX-compatible toolchain and shell)
318+
RUN iwr https://download.gapotchenko.com/gnu-tk/latest/gnu-tk-setup-windows-x64.msi -UseBasicParsing -OutFile gnu-tk.msi
319+
RUN msiexec /i gnu-tk.msi /quiet
320+
RUN del gnu-tk.msi
321+
322+
# Configure container to use a POSIX shell
323+
SHELL ["gnu-tk", "-t", "busybox", "--verbatim", "-l"]
324+
```
325+
326+
In this configuration, GNU-TK is explicitly instructed to use the **BusyBox**
327+
toolkit, which is bundled with the GNU-TK Windows distribution. This enables
328+
standard POSIX shell semantics within Windows-based Docker containers.

0 commit comments

Comments
 (0)