generated from devcontainers/template-starter
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from marcitqualab/main
Base clojure template
- Loading branch information
Showing
16 changed files
with
126 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM clojure:${templateOption:imageTag} | ||
|
||
ARG USERNAME=vscode | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
# Create the user | ||
RUN groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ | ||
# | ||
# [Optional] Add sudo support. Omit if you don't need to install software after connecting. | ||
&& apt-get update \ | ||
&& apt-get install -y sudo \ | ||
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ | ||
&& chmod 0440 /etc/sudoers.d/$USERNAME | ||
|
||
|
||
# [Optional] Set the default user. Omit if you want to keep the default as root. | ||
USER $USERNAME | ||
SHELL ["/bin/bash", "-ec"] | ||
ENTRYPOINT ["bash"] | ||
|
||
|
||
# Prepare clojure tools | ||
RUN clojure -Ttools list && \ | ||
clojure -Ttools install io.github.seancorfield/clj-new '{:git/tag "v1.2.404" :git/sha "d4a6508"}' :as clj-new && \ | ||
clojure -Ttools install-latest :lib io.github.seancorfield/deps-new :as new && \ | ||
clojure -Ttools list | ||
|
||
RUN sudo apt-get update && \ | ||
sudo apt-get install -y lsb-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/scicloj/devcontainer-templates/tree/main/src/basecloj | ||
{ | ||
"name": "Base clojure dev env", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
"USERNAME": "${localEnv:USER}" | ||
} | ||
}, | ||
"remoteUser": "${localEnv:USER}", | ||
"containerUser": "${localEnv:USER}", | ||
"features": { | ||
"ghcr.io/devcontainers/features/git:1": {} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"betterthantomorrow.calva" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
|
||
|
||
## Options | ||
|
||
| Options Id | Description | Type | Default Value | | ||
|-----|-----|-----|-----| | ||
|
||
>Note: comming soon | ||
# A minimal devcontainer with JAVA, Clojure and minimal clj tools | ||
|
||
It sets up a minimal dev container environment with green fields minimal tools for Clojure. | ||
|
||
# Quickstart | ||
|
||
0. Install [devcontainer cli](https://github.com/devcontainers/cli) | ||
1. Run `devcontainer templates apply -t ghcr.io/scicloj/devcontainer-templates/basecloj` to create a devcontainer setup | ||
with default settings in your current directoty | ||
2. Open folder with VSCode / devcontainer / devpod / Codespaces and trigger/wait for container build | ||
3. [Start the Calva repl](https://calva.io/getting-started/) | ||
|
||
|
||
4. Create a new app, lib, template and more: | ||
* Read [deps-new](https://github.com/seancorfield/deps-new) | ||
* Read [clj-new docs](https://github.com/seancorfield/clj-new) | ||
|
||
## Customization | ||
5. Install more features in devcontainer: https://containers.dev/features | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"id": "basecloj", | ||
"version": "1.0.0", | ||
"name": "Base clojure development environment", | ||
"description": "A devcontainer template with the minimum clojure tools and configuration, this template is intended to create new greenfield clojure project that should be further customised on specific project needs. ", | ||
"documentationURL": "https://github.com/scicloj/devcontainer-templates/tree/main/src/basecloj", | ||
"licenseURL": "https://github.com/scicloj/devcontainer-templates/blob/main/LICENSE", | ||
"options": { | ||
"imageTag": { | ||
"type": "string", | ||
"description": "Tag of official Clojure image", | ||
"proposals": [ | ||
"temurin-8-tools-deps-jammy", | ||
"temurin-11-tools-deps-jammy", | ||
"temurin-17-tools-deps-jammy", | ||
"temurin-21-tools-deps-jammy" | ||
], | ||
"default": "temurin-21-tools-deps-jammy" | ||
} | ||
}, | ||
"platforms": [ | ||
"Any" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
cd $(dirname "$0") | ||
source test-utils.sh | ||
|
||
# Template specific tests | ||
check "distro" lsb_release -a | ||
check "java_jdk" java --version | ||
check "clojure" clojure --version | ||
check "clj" clj --version | ||
check "user" id | ||
|
||
# Report result | ||
reportResults |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.