Issue creating Docker image using SAFE stack documentation.
Hi, I've followed the following steps using the SAFE template (regular template, not minimal) and I am running into the following issues. https://safe-stack.github.io/docs/recipes/build/docker-image/
c:\LearnerDockerTest1>docker build -t abcd . [+] Building 0.1s (2/2) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 2B 0.0s => [internal] load .dockerignore 0.1s => => transferring context: 223B 0.0s failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount315078222/Dockerfile: no such file or directory
c:\LearnerDockerTest1>docker run -it -p 8085:8085 abcd Unable to find image 'abcd:latest' locally docker: Error response from daemon: pull access denied for abcd, repository does not exist or may require 'docker login': denied: requested access to the resource is denied. See 'docker run --help'.
Did you create the Dockerfile? Check that it's at
C:\\LearnerDockerTest1\\Dockerfile named correctly without any file
extension and with the capital first letter.
Yeah. Dockerfile, no extension. I copy and pasted the Dockerfile from the documentation.
Here it is below. I am no expert at configuring docker. But I do appear to have Docker desktop running. My current work around is using "dotnet run Azure" to deploy to the cloud.
FROM mcr.microsoft.com/dotnet/sdk:6.0 as build
# Install node
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash
RUN apt-get update && apt-get install -y nodejs
WORKDIR /workspace
COPY . .
RUN dotnet tool restore
RUN dotnet run Bundle
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine
COPY --from=build /workspace/deploy /app
WORKDIR /app
EXPOSE 8085
ENTRYPOINT [ "dotnet", "Server.dll" ]
IDK why it can't find your Dockerfile then. Can you paste a screenshot of
dir just to make sure everything is in the right place?
https://github.com/docker/for-win/issues/8781
When you docker build other projects does it find it correctly or is this the first time using dockerfiles? If you're new to docker, you could try following this getting started guide to see if that works for you.
I'm closing this for now as there has been no response.