tl;dr: Docker error as soon as I have more than 1 line in my Dockerfile.
- Dev environment: Ubuntu 20.04 LTS in WSL (Bash)
- Build environment: Windows Server 2019 (PowerShell)
Version 1 of my Dockerfile:
FROM hello-world:nanoserver-1809
Build command:
docker build -t hello-world:windows .
Output:
Sending build context to Docker daemon 4.096kB
Step 1/1 : FROM hello-world:nanoserver-1809
---> bb8a46951ebd
Successfully built bb8a46951ebd
Successfully tagged hello-world:windows
--> This is OK!
Version 2 of my Dockerfile:
FROM hello-world:nanoserver-1809
WORKDIR tmp
ADD https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs952/gs952w64.exe .
RUN gs952w64.exe /S
Build command:
docker build -t hello-world:windows .
Output:
Sending build context to Docker daemon 4.096kB
Error response from daemon: Dockerfile parse error line 1: FROM requires either one or three arguments
--> This is unexpected!
Honestly, I'm baffled. What's wrong here? How do I write simple dockerfiles that don't produce unexpected errors?