forked from linkedin/Hoptimator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b80ebe
commit 72d7d81
Showing
5 changed files
with
110 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
ARG VARIANT=11-bullseye | ||
FROM mcr.microsoft.com/vscode/devcontainers/java:1-11-bullseye | ||
|
||
ARG MAVEN_VERSION="" | ||
RUN su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install maven \"${MAVEN_VERSION}\""; | ||
COPY --chown=vscode:vscode settings.xml /home/vscode/.m2/ | ||
COPY maven-settings.xml /usr/share/maven/ref/ | ||
|
||
|
||
# [Option] Install Gradle | ||
ARG GRADLE_VERSION="" | ||
RUN if [ "${INSTALL_GRADLE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install gradle \"${GRADLE_VERSION}\""; 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 git openssh-client less iproute2 procps curl lsb-release exa wget unzip | ||
|
||
# Clean up | ||
RUN export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Allow for a consistant java home location for settings - image is changing over time | ||
RUN if [ ! -d "/docker-java-home" ]; then ln -s "${JAVA_HOME}" /docker-java-home; fi | ||
|
||
# [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 |
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,49 @@ | ||
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/java | ||
{ | ||
"name": "Java", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
"java.home": "/docker-java-home", | ||
// Options | ||
"MAVEN_VERSION": "3.6.3", | ||
"INSTALL_GRADLE": "true", | ||
"GRADLE_VERSION": "6.8.3" | ||
} | ||
}, | ||
"containerEnv": { | ||
"GITHUB_ACTOR": "${localEnv:GITHUB_ACTOR}", | ||
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}" | ||
}, | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"vscjava.vscode-java-pack", | ||
"DotJoshJohnson.xml", | ||
"ms-azuretools.vscode-docker", | ||
"VisualStudioExptTeam.vscodeintellicode", | ||
"vscjava.vscode-maven", | ||
"vscjava.vscode-java-dependency", | ||
"redhat.vscode-yaml", | ||
"tamasfe.even-better-toml", | ||
"GitHub.copilot" | ||
], | ||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"java.home": "/docker-java-home", | ||
"maven.executable.path": "/usr/local/sdkman/candidates/maven/current/bin/mvn" | ||
} | ||
} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": {} | ||
}, | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "java -version", | ||
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode" | ||
} |
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,6 @@ | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 | ||
https://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
<localRepository>/usr/share/maven/ref/repository</localRepository> | ||
</settings> |
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,25 @@ | ||
<!-- COPY OF ../settings.xml! --> | ||
<settings> | ||
<interactiveMode>false</interactiveMode> | ||
<profiles/> | ||
<servers> | ||
<server> | ||
<id>github</id> | ||
<username>${env.GITHUB_ACTOR}</username> | ||
<password>${env.GITHUB_TOKEN}</password> | ||
</server> | ||
<server> | ||
<id>cheetah-lib-processing-local-dev-repo</id> | ||
<configuration> | ||
<timeout>6000</timeout> <!-- milliseconds --> | ||
<httpConfiguration> | ||
<all> | ||
<connectionTimeout>5000</connectionTimeout> | ||
<readTimeout>5000</readTimeout> | ||
</all> | ||
</httpConfiguration> | ||
</configuration> | ||
</server> | ||
</servers> | ||
<mirrors/> | ||
</settings> |
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
*/build/ | ||
*/*.iml | ||
./models/external/ | ||
bin/ | ||
|
||
# Compiled class file | ||
*.class | ||
|