In the getting started section it asks you to build a simple dockerfile.
This happens - anyone have any idea why?
Win 10 Surface Book 2 - Powershell Admin
Here’s the instructions from the web page
Step 4: Build and push a container image to Docker Hub from your computer
Start by creating a Dockerfile to specify your application as shown below. (More on Dockerfiles here)
cat > Dockerfile <<EOF
FROM busybox
CMD echo "Hello world! This is my first Docker image."
EOF
Here is what happens
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\WINDOWS\system32> cat > Dockerfile <<EOF
At line:1 char:19
+ cat > Dockerfile <<EOF
+ ~
Missing file specification after redirection operator.
At line:1 char:18
+ cat > Dockerfile <<EOF
+ ~
The '<' operator is reserved for future use.
At line:1 char:19
+ cat > Dockerfile <<EOF
+ ~
The '<' operator is reserved for future use.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingFileSpecification
PS C:\WINDOWS\system32>
After the powershell fail I tried cmder - same fail
Then I tried Mingw64 and it worked as directed.
The next step BOLDED failed in all three
Instruction
Step 4: Build and push a container image to Docker Hub from your computer
Start by creating a Dockerfile to specify your application as shown below. (More on Dockerfiles here)
cat > Dockerfile <<EOF
FROM busybox
CMD echo "Hello world! This is my first Docker image."
EOF
1. Run docker build -t <your_username>/my-first-repo . to build your Docker image
2. Test your docker image locally by running docker run <your_username>/my-first-repo
Yes of course, this flag is documented in the docs for docker run.
But maybe you are taking the wrong approach. Instead of reading ‘getting started’ tutorials it could be better to follow a course with detailed instructions, for example Docker Mastery on Udemy.