Docker image build issue

40 Views Asked by At
ERROR: failed to solve: myimage: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

 => ERROR [internal] load metadata for docker.io/library/myimage:latest

I was trying to build the image with below command

docker build -t myimages .

My dockerfile is below

FROM myimage
WORKDIR /app
COPY . /app
RUN javac sample.java
CMD [ "java","sample" ]
1

There are 1 best solutions below

1
oxfn On

FROM should be base image, like

FROM openjdk:latest
...

https://docs.docker.com/engine/reference/builder/#from

https://hub.docker.com/_/openjdk