Boa noite desenvolvi minha aplicação com a versao 11 do java, porem nao obtive sucesso ao rodar o docker build. Tambem tentei executar com o arquivo apontando para o java 8, nesta situação as o projeto foi "buildado", mas tomo outro erro ao tentar rodar o container com as variaveis de ambiente.
Dockerfile: FROM adoptopenjdk/openjdk11:latest RUN addgroup -S spring && adduser -S spring -G spring USER spring:spring ARG JAR_FILE=target/*.jar COPY ${JAR_FILE} app.jar ENTRYPOINT ["java","-jar","/app.jar"]
Resultado: ~/eclipse-workspace/forum$ sudo docker build -t alpha/forum . Sending build context to Docker daemon 56.18MB Step 1/6 : FROM adoptopenjdk/openjdk11:latest ---> 2ceef4d6c617 Step 2/6 : RUN addgroup -S spring1 && adduser -S spring -G spring ---> Running in f752407f9798 Option s is ambiguous (shell, system) adduser [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--firstuid ID] [--lastuid ID] [--gecos GECOS] [--ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] [--add_extra_groups] [--encrypt-home] USER Add a normal user
adduser --system [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--gecos GECOS] [--group | --ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] [--add_extra_groups] USER Add a system user
adduser --group [--gid ID] GROUP addgroup [--gid ID] GROUP Add a user group
addgroup --system [--gid ID] GROUP Add a system group
adduser USER GROUP Add an existing user to an existing group
general options: --quiet | -q don't give process information to stdout --force-badname allow usernames which do not match the NAME_REGEX[_SYSTEM] configuration variable --extrausers uses extra users as the database --help | -h usage message --version | -v version number and copyright --conf | -c FILE use FILE as configuration file
The command '/bin/sh -c addgroup -S spring1 && adduser -S spring -G spring' returned a non-zero code: 1