Fork me on GitHub
#aws
<
2023-06-26
>
pesterhazy12:06:41

We want to run an HTTP server on ECS Fargate. Which docker base image should we use?

pesterhazy12:06:14

The first thought was amazoncorretto:17-alpine3.17, but I'm curious what people use, and why

practicalli-johnny15:06:14

I build a Clojure project using official docker image for Clojure Then deploy on the official docker image for Eclipse Temurin (which is the base for the Clojure docker image) I run Eclipse Temurin locally, so it helps with consistency and minimises maintenance of adding Clojure tools to another image (i.e. amazoncorretto) https://practical.li/blog/posts/build-and-run-clojure-with-multistage-dockerfile/

jumar18:06:43

I suspect you donโ€™t actually need Clojure or?

pesterhazy18:06:08

Correct, only Java

jumar09:06:07

We are old fashioned and simply use

FROM amazonlinux:latest
Then we install bunch of stuff including JDK
RUN yum -y update \
  && yum -y install \
  git \
  java-17-amazon-corretto-headless

๐Ÿ‘ 2
pesterhazy18:06:56

It's funny how openjdk distributions from lesser players (Amazon, Eclipse) have taken over for Docker โ€“ anyone know why that is?

practicalli-johnny20:06:59

I wouldn't consider the Eclipse foundation as lesser players give the history of openjdk. The original openjdk team evolved into the AdoptOpenJDK community which eventually became part of the Eclipse foundation. The AdoptOpenJDK community did a lot of work to evolve the development workflow and infrastructure and many from the community have also contributed to JSRs. There has also been a significant involvement from the London Java Community on many level along with other Java communities. Eclipse foundation has been around for a long time and also created an openjdk distribution with a variation of the hotspot and compiler, so merging with AdoptOpenJDK community made a lot of sense. IBM used to be quite active with their openjdk distribution, but I'm unclear how much effort is still invested in it. I assume Amazon wanted to add some tweaks/ optimisations for running openjdk on their infrastructure and rolled their own flavor which became Corretto. Having their own openjdk also avoids issues like the Oracle license charges. Amazon also role their own Linux distro which would make dealing with support issues more effective as AWS provides more of the stack. Having a CLI, Linux and jdk distro under their control also makes onboarding to AWS a little simpler and consistent for those adopting that path.

๐Ÿ‘ 2
practicalli-johnny15:06:14

I build a Clojure project using official docker image for Clojure Then deploy on the official docker image for Eclipse Temurin (which is the base for the Clojure docker image) I run Eclipse Temurin locally, so it helps with consistency and minimises maintenance of adding Clojure tools to another image (i.e. amazoncorretto) https://practical.li/blog/posts/build-and-run-clojure-with-multistage-dockerfile/

pesterhazy18:06:56

It's funny how openjdk distributions from lesser players (Amazon, Eclipse) have taken over for Docker โ€“ anyone know why that is?