• 请不要在回答技术问题时复制粘贴 AI 生成的内容
helloword001
V2EX  ›  程序员

请教一下,大家 springboot 项目和 spring cloud 微服务项目,通过 Docker 部署,是部署在 CentOS 还是 Debian 还是 eclipse-temurin、openjdk 啊

  •  
  •   helloword001 · Jun 16, 2025 · 3168 views
    This topic created in 522 days ago, the information mentioned may be changed or developed.
    请教一下,大家 springboot 项目和 spring cloud 微服务项目,通过 Docker 部署,是部署在 CentOS 还是 Debian 还是 eclipse-temurin 、openjdk 啊
    Supplement 1  ·  Jun 16, 2025
    第一步是先安装 CentOS 还是 Debian 系统
    第二步是安装 Docker 环境
    第三步是安装 eclipse-temurin 、openjdk 镜像吗

    各位大佬,是这样吗
    13 replies  •  2025-06-17 16:41:03 +08:00
    aincvy
    aincvy
    Jun 16, 2025
    1
    我用得 docker, 用得 `eclipse-temurin` 镜像。

    我们公司有其他项目组用得 K8S
    blessingcr
    blessingcr
    Jun 16, 2025
    2
    目前 k8s openjdk , 之前是 docker openjdk
    sheeta
    sheeta
    Jun 16, 2025
    3
    Debian Zulu
    hdfg159
    hdfg159
    Jun 16, 2025
    5
    amazoncorretto:21-al2023-jdk
    guanyujia5444
    guanyujia5444
    Jun 16, 2025
    6
    同样是 amazoncorretto al2023-jdk
    zed1018
    zed1018
    Jun 16, 2025
    7
    k8s FROM eclipse-temurin:21-alpine
    helloword001
    helloword001
    OP
    Jun 16, 2025
    8
    @aincvy
    @blessingcr
    @sheeta
    @sifeizhai2020
    @hdfg159
    @guanyujia5444
    @zed1018

    第一步是购买阿里云服务器
    第二步是安装 CentOS 或者 Debian 系统
    第三步是安装 Docker 环境
    第四步是安装 eclipse-temurin 、openjdk 镜像

    各位大佬,是这样吗
    zed1018
    zed1018
    Jun 16, 2025
    9
    @helloword001 镜像不是安装的,是写 Dockerfile ,在里面去 build bootJar ,然后 CP jar 包到容器某个目录,最后用 CMD 或者 ENTRYPOINT 运行即可。

    https://medium.com/@office.yeon/dockerizing-with-multi-stage-builds-in-spring-boot-multi-module-project-1fd3aa886afc
    Need4more
    Need4more
    Jun 16, 2025
    10
    @helloword001 如果你不是想学习这些技术的话,最快跑起来一个项目,你可以:
    1. 阿里云镜像市场选带 docker 环境的系统镜像,它们会帮你配置好 docker 的国内源
    2. 选一些部署平台,比如 render/vercel/netlify 这种,你提供代码就行

    供参考
    helloword001
    helloword001
    OP
    Jun 17, 2025
    11
    @zed1018
    @Need4more
    好的,谢谢两位大佬
    guanyujia5444
    guanyujia5444
    Jun 17, 2025
    12
    @helloword001 #8 你们有运维就让运维来干,没有运维,就写个 Dockerfile ,二次构建,打包镜像用 maven 的,运行镜像用 jdk
    helloword001
    helloword001
    OP
    Jun 17, 2025
    13
    @guanyujia5444 好的,大佬,没有运维,阿里云选的带 Docker 的系统部署的 Dockerfile
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3408 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 05:35 · PVG 13:35 · LAX 21:35 · JFK 00:35
    ♥ Do have faith in what you're doing.