yidinghe
V2EX  ›  Docker

若想把 openJDK 的官方镜像和 Python 的官方镜像合成一个镜像,该如何写 Dockerfile?

  •  
  •   yidinghe · Oct 14, 2021 via Android · 1945 views
    This topic created in 1703 days ago, the information mentioned may be changed or developed.
    AoEiuV020
        1
    AoEiuV020  
       Oct 15, 2021
    不行的吧,自己基于操作系统镜像安装一下 openJdk 和 python,
    lupus721
        2
    lupus721  
       Jan 11, 2022
    https://gist.githubusercontent.com/wenyurush/ca670dafa0526a3ffdedcf2f9696126e/raw/33b62ae39bffffec28e19c405b388e92864b5944/python-openjdk.dockerfile

    自己缝合了一个,确保可以构建成功,py 和 java 都 ok

    试了下不能贴图。。算了。。

    ```
    root@1bd3c08d01ac:/# java -version
    openjdk version "19-ea" 2022-09-20
    OpenJDK Runtime Environment (build 19-ea+4-144)
    OpenJDK 64-Bit Server VM (build 19-ea+4-144, mixed mode, sharing)
    root@1bd3c08d01ac:/# python -version
    Unknown option: -e
    usage: (null) [option] ... [-c cmd | -m mod | file | -] [arg] ...
    Try `python -h' for more information.
    root@1bd3c08d01ac:/# python -V
    Python 3.11.0a3
    root@1bd3c08d01ac:/#
    ```
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2822 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 12:10 · PVG 20:10 · LAX 05:10 · JFK 08:10
    ♥ Do have faith in what you're doing.