Skip to content

Commit e87f13c

Browse files
Update base docker image to alpine (#1)
1 parent 0953dc9 commit e87f13c

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
task 3.34.1
22
java temurin-21.0.2+13.0.LTS
3-
clojure 1.11.3.1463
4-
node 16.16.0
3+
clojure 1.11.3.1456
4+
node 20.13.1
55
cljstyle 0.16.626
66
clj-kondo 2024.05.22

Dockerfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
FROM eclipse-temurin:21.0.2_13-jre-jammy AS build
1+
FROM --platform=linux/amd64 clojure:temurin-21-tools-deps-1.11.3.1456-alpine AS build
22

33
WORKDIR /app
4-
# System deps
5-
ENV PATH="/root/.local/bin:/root/.local/share/mise/shims:$PATH"
6-
RUN apt update && apt install git -y && curl https://mise.run | sh
7-
COPY .tool-versions /app/
8-
RUN mise install -y node clojure
94

10-
# Node deps
5+
# Install npm
6+
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.20/community" >> /etc/apk/repositories
7+
RUN apk add --update --no-cache curl npm=10.8.0-r0
8+
9+
## Node deps
1110
COPY package.json package-lock.json /app/
1211
RUN npm i
1312

@@ -21,13 +20,13 @@ RUN npx tailwindcss -i ./resources/public/css/input.css -o ./resources/public/cs
2120
&& clojure -M:dev:cljs:shadow release app \
2221
&& clojure -T:build build
2322

23+
2424
# Result image
25-
FROM eclipse-temurin:21.0.2_13-jre-jammy
25+
FROM --platform=linux/amd64 eclipse-temurin:21.0.2_13-jre-alpine
2626
LABEL org.opencontainers.image.source=https://github.com/abogoyavlensky/clojure-kamal-example
2727

2828
WORKDIR /app
2929
COPY --from=build /app/target/standalone.jar /app/standalone.jar
3030

31-
# Run application
3231
EXPOSE 80
3332
CMD ["java", "-Xms64m", "-Xmx256m", "-jar", "standalone.jar"]

deps.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
day8.re-frame/http-fx {:mvn/version "0.2.4"}
3333
cljs-ajax/cljs-ajax {:mvn/version "0.8.4"}}}
3434

35-
:shadow {:extra-deps {thheller/shadow-cljs {:mvn/version "2.28.7"}}
35+
:shadow {:extra-deps {thheller/shadow-cljs {:mvn/version "2.28.8"}}
3636
:main-opts ["-m" "shadow.cljs.devtools.cli"]}
3737

3838
:test {:extra-paths ["test/clj" "test/cljs"]

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"name": "clojure-kamal-example",
33
"engines": {
4-
"npm": ">=8.0.0 <9.0.0",
5-
"node": ">=16.0.0 <17.0.0"
4+
"npm": ">=10.0.0 <11.0.0"
65
},
76
"dependencies": {
87
"create-react-class": "15.7.0",

0 commit comments

Comments
 (0)