How to package this clojure + node project?

The repo is athensresearch/athens. The Dockerfile looks like this:

ARG http_proxy
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
RUN apt-get update

# install nvm
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh

# Set debconf to run non-interactively
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

# Install base dependencies
RUN apt-get update && apt-get install -y -q --no-install-recommends \
        apt-transport-https \
        build-essential \
        ca-certificates \
        curl \
        git \
        libssl-dev \
        wget \
    && rm -rf /var/lib/apt/lists/*

ENV NVM_DIR /usr/local/nvm # or ~/.nvm , depending

RUN curl -sL | bash -
RUN apt-get install -y nodejs

RUN curl -sS | apt-key add -
RUN echo "deb stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update
RUN apt-get install -y --no-install-recommends yarn
RUN git clone --depth 1 .
#RUN cd athens
RUN yarn
COPY project.clj /usr/src/app/project.clj
RUN lein do compile
CMD ["lein", "dev"]
EXPOSE 3000 8777 9630

For now I’m just using Podman on the dockerfile. I tried using nmattia/napalm for the Node stuff but that broke on dependencies, and I’m not familiar with the Clojure ecosystem so I don’t know how to package that at all. I couldn’t find anything with bin/lein in nixpkgs.

Is this one hard to package and I should leave it to the experts, or what would you suggest?

1 Like