Skip to content

Commit

Permalink
actions: Switched to new versions of actions as part of Node.js v16-t…
Browse files Browse the repository at this point in the history
…o-v20 transition.

Updated Dockerfile to use the latest stable release of Clojure and added fontconfig and font packages.
Extended README a bit.
  • Loading branch information
vasilev committed Mar 1, 2024
1 parent 08ed499 commit e516946
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ jobs:
if: github.event_name == 'push'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Log into registry (DockerHub)
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Log into registry (ghcr.io)
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PASSWORD }}

- name: Extract metadata
id: metadata
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: |
vasilev/clojurescript
Expand All @@ -44,11 +44,9 @@ jobs:
run: echo '${{ steps.metadata.outputs.json }}'

- name: Build and push the image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
CLOJURE_VERSION=1.11.1.1208
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FROM node:alpine

ARG CLOJURE_VERSION=1.10.3.822

RUN apk --no-cache add openjdk11 curl bash \
RUN apk --no-cache add openjdk11 curl bash fontconfig ttf-dejavu \
&& yarn global add shadow-cljs \
&& curl -sSL https://download.clojure.org/install/linux-install-${CLOJURE_VERSION}.sh | bash
&& curl -sSL https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh | bash

ENTRYPOINT ["/bin/bash"]
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ As long as Alpine-based Clojure images seem to be deprecated, just created the o

*Currently beta*

This project is aimed to support interactive development like authoring code, testing, debugging, using REPL, etc.
What's why it has `ENTRYPOINT ["/bin/bash"]` and contains additional packages required by `--repl` mode such as `fontconfig` and fonts.

If you're seeking a Docker image for intents other than interactive development, consider
the [alternative](https://github.com/theasp/docker-clojurescript-nodejs/). That image has `CMD [ "node" ]` and may
fullfill your needs better.

# Alternatives

This project was created independently on the base of official documentation. Several weeks later found that following projects had used same approaches:
Expand Down

0 comments on commit e516946

Please sign in to comment.