Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mikelde committed Mar 27, 2024
1 parent 84e431a commit f84dccf
Showing 1 changed file with 30 additions and 28 deletions.
58 changes: 30 additions & 28 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ARG POLYLITH_VERSION="0.2.13-alpha"

ARG INSTALL_CLOJURE_CLI="true"
ARG INSTALL_LEININGEN="true"
ARG INSTALL_POLYLITH="true"

# # [Option] Install Clojure CLI tool
# ARG INSTALL_CLOJURE_CLI="${templateOption:installClojureCli}"
Expand All @@ -45,31 +46,32 @@ RUN if [ "${INSTALL_LEININGEN}" = "true" ]; then \
&& chmod +x lein \
&& mv lein /usr/local/sbin; fi

# # Cache Clojure and dependencies
# RUN if [ "${INSTALL_LEININGEN}" = "true" ]; then \
# su vscode -c " cd ~ \
# && echo '(defproject dummy \"\" :dependencies [[org.clojure/clojure \"'${CLOJURE_VERSION}'\"]])' > project.clj \
# && lein deps \
# && rm project.clj"; fi

# RUN if [ "${INSTALL_POLYLITH}" = "true" ]; then \
# curl -OL "https://github.com/polyfy/polylith/releases/download/v${POLYLITH_VERSION}/poly-${POLYLITH_VERSION}.jar" \
# && mkdir -p /usr/local/polylith \
# && mv poly-$POLYLITH_VERSION.jar /usr/local/polylith \
# && echo '#!/bin/sh\nARGS=""\nwhile [ "$1" != "" ] ; do\n ARGS="$ARGS $1"\n shift\ndone\nexec "java" $JVM_OPTS "-jar" "/usr/local/polylith/poly-'$POLYLITH_VERSION'.jar" $ARGS\n' > /usr/local/sbin/poly \
# && chmod +x /usr/local/sbin/poly \
# && /usr/local/sbin/poly version; fi

# # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
# ARG NODE_VERSION="${templateOption:nodeVersion}"
# RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# # [Optional] Uncomment this section to install additional OS packages.
# # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# # && apt-get -y install --no-install-recommends <your-package-list-here>

# # [Optional] Uncomment this line to install global node packages.
# # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

# # Clean up package lists
# RUN apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
# Cache Clojure and dependencies
RUN if [ "${INSTALL_LEININGEN}" = "true" ]; then \
su vscode -c " cd ~ \
&& echo '(defproject dummy \"\" :dependencies [[org.clojure/clojure \"'${CLOJURE_VERSION}'\"]])' > project.clj \
&& lein deps \
&& rm project.clj"; fi

RUN if [ "${INSTALL_POLYLITH}" = "true" ]; then \
curl -OL "https://github.com/polyfy/polylith/releases/download/v${POLYLITH_VERSION}/poly-${POLYLITH_VERSION}.jar" \
&& mkdir -p /usr/local/polylith \
&& mv poly-$POLYLITH_VERSION.jar /usr/local/polylith \
&& echo '#!/bin/sh\nARGS=""\nwhile [ "$1" != "" ] ; do\n ARGS="$ARGS $1"\n shift\ndone\nexec "java" $JVM_OPTS "-jar" "/usr/local/polylith/poly-'$POLYLITH_VERSION'.jar" $ARGS\n' > /usr/local/sbin/poly \
&& chmod +x /usr/local/sbin/poly \
&& /usr/local/sbin/poly version; fi

# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
#ARG NODE_VERSION="${templateOption:nodeVersion}"
ARG NODE_VERSION="16"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

# Clean up package lists
RUN apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*

0 comments on commit f84dccf

Please sign in to comment.