Skip to content

Commit ddc4c12

Browse files
Update devcontainer settings, add oft binary (#254)
- fix/update some devcontainer VSCode settings - add openfasttrace tool to devcontainer
1 parent fb2d0d2 commit ddc4c12

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

.devcontainer/Dockerfile

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,27 @@ ARG TARGETARCH
1717

1818
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
1919
&& apt-get -y install \
20-
# Others
2120
curl \
22-
zip \
2321
gcc \
2422
git \
23+
openjdk-17-jre \
24+
zip \
2525
&& \
2626
rm -rf /var/lib/apt/lists/*
2727

28+
# Download openfasttrace JARs and create shortcut oft executable
29+
ARG OFT_CORE_VERSION=4.1.0
30+
ARG OFT_ASCIIDOC_PLUGIN_VERSION=0.3.0
31+
ENV LIB_DIR=/opt/oft/lib
32+
RUN <<EOF
33+
mkdir -p $LIB_DIR
34+
base_url=https://github.com/itsallcode
35+
wget -P $LIB_DIR ${base_url}/openfasttrace/releases/download/$OFT_CORE_VERSION/openfasttrace-$OFT_CORE_VERSION.jar
36+
wget -P $LIB_DIR ${base_url}/openfasttrace-asciidoc-plugin/releases/download/$OFT_ASCIIDOC_PLUGIN_VERSION/openfasttrace-asciidoc-plugin-$OFT_ASCIIDOC_PLUGIN_VERSION-with-dependencies.jar
37+
EOF
38+
RUN echo '#!/bin/bash\n\njava -cp "${LIB_DIR}/*" org.itsallcode.openfasttrace.core.cli.CliStarter "$@"' > /usr/local/bin/oft \
39+
&& chmod +x /usr/local/bin/oft
40+
2841
# Before installing cargo tools, change to the user that will be used in the container later.
2942
# The reason is that cargo creates some cache, etc. folders with the correct group rustlang, but
3043
# without making them group writable. Easiest fix is to change to the correct user before the install,

.devcontainer/devcontainer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"files.watcherExclude": {
2424
"**/target/**": true
2525
},
26-
"rust-analyzer.checkOnSave.command": "clippy",
26+
"rust-analyzer.check.command": "clippy",
27+
"rust-analyzer.checkOnSave": true,
2728
"coverage-gutters.coverageBaseDir": "**",
2829
"coverage-gutters.coverageFileNames": [
2930
"target/tarpaulin/lcov.info"
@@ -36,17 +37,17 @@
3637
"bierner.markdown-mermaid",
3738
"bierner.markdown-preview-github-styles",
3839
"davidanson.vscode-markdownlint",
40+
"gxl.git-graph-3",
3941
"hediet.vscode-drawio",
4042
"linusu.auto-dark-mode",
4143
"mhutchie.git-graph",
42-
"ryanluker.vscode-coverage-gutters",
44+
"ms-azuretools.vscode-docker",
4345
"rust-lang.rust-analyzer",
4446
"streetsidesoftware.code-spell-checker",
4547
"tamasfe.even-better-toml",
4648
"timonwong.shellcheck",
4749
"vadimcn.vscode-lldb",
48-
"yzhang.markdown-all-in-one",
49-
"zxh404.vscode-proto3"
50+
"yzhang.markdown-all-in-one"
5051
]
5152
}
5253
},

0 commit comments

Comments
 (0)