DrSnowbird / jdk-mvn-py3

Ubuntu 24.04 + OpenJDK Java 23 + Maven 3.9 + Python 3.12 + pip 23 + node 21 + npm 10 + Yarn + Gradle 7
Apache License 2.0
16 stars 21 forks source link

Docker build with `Dockerfile-openjdk11` fails on Windows 10 #6

Closed shortthirdman closed 1 year ago

shortthirdman commented 2 years ago

Hi @DrSnowbird ,

I tried building the Docker image with Dockerfile-openjdk11 by running the following command:

docker build --progress=plain --compress --rm -t cosmos-ci:latest -f Dockerfile-openjdk11 .

But unfortuantely, the build failed at the setting up proxy setup with the following log:

#19 [15/27] RUN cd /usr/scripts; /usr/scripts/setup_npm_proxy.sh
#19 sha256:1123e9f8a9cc526cf4e88cb313e10458e7541585b3bbc07d8263b08459bdba52
: invalid optionash: -
#19 1.740 Usage:        /bin/bash [GNU long option] [option] ...
#19 1.740       /bin/bash [GNU long option] [option] script-file ...
#19 1.740 GNU long options:
#19 1.740       --debug
#19 1.740       --debugger
#19 1.740       --dump-po-strings
#19 1.740       --dump-strings
#19 1.740       --help
#19 1.740       --init-file
#19 1.740       --login
#19 1.740       --noediting
#19 1.740       --noprofile
#19 1.740       --norc
#19 1.740       --posix
#19 1.740       --rcfile
#19 1.740       --restricted
#19 1.740       --verbose
#19 1.740       --version
#19 1.740 Shell options:
#19 1.740       -ilrsD or -c command or -O shopt_option         (invocation only)
#19 1.740       -abefhkmnptuvxBCHP or -o option
#19 ERROR: executor failed running [/bin/sh -c cd ${SCRIPT_DIR}; ${SCRIPT_DIR}/setup_npm_proxy.sh]: exit code: 2
------
 > [15/27] RUN cd /usr/scripts; /usr/scripts/setup_npm_proxy.sh:
------
executor failed running [/bin/sh -c cd ${SCRIPT_DIR}; ${SCRIPT_DIR}/setup_npm_proxy.sh]: exit code: 2

Please let me know where I am going wrong (if any).

DrSnowbird commented 2 years ago

Hi,

I fixed the proxy files copy. If it is the cause for the failure again. You can just comment out the entire section of "proxy setup" in Dockerfile unless you need auto-proxy setup.

Those dockerfile-xxxx are obsolete. And, I removed them now. The default is already OpenJDK 11 already. Hence, you don't need to use this Dockerfile-openjdk11. Just use the "Dockerfile" (it is already OpenJDK 11).

I recommend you to use openkbs/jdk11-mvn-py3 GIT for few reasons below:

Added on 2022-06-07:

And, if you are working on Deep Learning / Deep Anything requiring GPU and NVIDIA ready Container, then

  1. https://github.com/DrSnowbird/cuda-pytorch-docker
  2. https://github.com/DrSnowbird/cuda-tensorflow-docker
shortthirdman commented 2 years ago

Thanks @DrSnowbird . Will try out this approach.