权限有问题(401)。我有一个简单的 Spring Boot 应用程序
drwxrwxr-x 7 miki miki 4096 Jan 7 07:06 ./
drwxr-xr-x 158 miki miki 12288 Jan 7 07:06 ../
-rw-rw-r-- 1 miki miki 178 Jan 7 07:06 Dockerfile
drwxrwxr-x 8 miki miki 4096 Jan 6 15:57 .git/
-rw-rw-r-- 1 miki miki 395 Jan 4 12:40 .gitignore
-rw-rw-r-- 1 miki miki 37 Jan 4 12:40 heroku.yml
drwxrwxr-x 3 miki miki 4096 Jan 4 12:40 .mvn/
-rwxrwxr-x 1 miki miki 10284 Jan 4 12:40 mvnw*
-rw-rw-r-- 1 miki miki 6734 Jan 4 12:40 mvnw.cmd
-rw-rw-r-- 1 miki miki 1238 Jan 4 12:40 pom.xml
-rw-rw-r-- 1 miki miki 1169 Jan 4 12:40 README.md
drwxrwxr-x 5 miki miki 4096 Jan 4 13:19 src/
drwxrwxr-x 9 miki miki 4096 Jan 4 13:59 target/
我可以使用 Dockerfile 构建镜像
FROM openjdk:8-jdk-alpine
RUN addgroup -S miki && adduser -S miki -G miki
USER miki:miki
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
当我尝试运行它时
docker run -p 8090:8090 praksaaspring
docker: you are not authorized to perform this operation: server returned 401.
See 'docker run --help'.
我可以运行 Nginx
docker run --detach --name web1 nginx:latest
aa5c305fa12134b281b665a766f7e4579e3e52ee11db218ed960e92647dcc758
我的应用程序怎么会失败?
如何解决这个问题呢?我尝试添加 USER 但得到了相同的结果。