-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Visual Studio Code Dev Container (#107)
- Loading branch information
1 parent
214f43c
commit 4fb280c
Showing
6 changed files
with
92 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,15 @@ | ||
FROM almalinux:9 | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
# classpath settings | ||
ENV CLASSPATH :/usr/lib/opensourcecobol4j/libcobj.jar:/usr/lib/Open-COBOL-ESQL-4j/ocesql4j.jar:/usr/lib/Open-COBOL-ESQL-4j/postgresql.jar | ||
RUN echo 'export CLASSPATH=:/usr/lib/opensourcecobol4j/libcobj.jar:/usr/lib/Open-COBOL-ESQL-4j/postgresql.jar:/usr/lib/Open-COBOL-ESQL-4j/ocesql4j.jar' >> ~/.bashrc | ||
|
||
# install dependencies | ||
RUN dnf update -y | ||
RUN dnf install -y epel-release | ||
RUN dnf install -y gcc make bison flex automake autoconf diffutils gettext java-21-openjdk-devel git-clang-format cppcheck libtool gettext-devel | ||
|
||
# install sbt | ||
RUN curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-pc-linux.gz | gzip -d > cs && chmod +x cs && echo Y | ./cs setup |
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,27 @@ | ||
#!/bin/bash | ||
|
||
# Install opensource COBOL 4J | ||
cd opensourcecobol4j/ | ||
./configure --prefix=/usr/ | ||
make | ||
make install | ||
cd ../ | ||
|
||
# Install Open COBOL ESQL 4J | ||
cp /usr/lib/opensourcecobol4j/libcobj.jar dblibj/lib/ | ||
cp /usr/lib/opensourcecobol4j/libcobj.jar dblibj/lib/ | ||
mkdir -p /usr/lib/Open-COBOL-ESQL-4j | ||
curl -L -o /usr/lib/Open-COBOL-ESQL-4j/postgresql.jar https://jdbc.postgresql.org/download/postgresql-42.2.24.jar | ||
cp /usr/lib/Open-COBOL-ESQL-4j/postgresql.jar dblibj/lib/ | ||
./configure --prefix=/usr/ | ||
make | ||
make install | ||
|
||
# Set up git config | ||
git config --global --add safe.directory /workspaces/Open-COBOL-ESQL-4j | ||
|
||
# Set up pre-commit hook | ||
cp .devcontainer/term_settings/pre-commit .git/hooks/pre-commit | ||
|
||
# Set up ~/.bashrc | ||
cat .devcontainer/term_settings/extra_bashrc.sh >> ~/.bashrc |
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,7 @@ | ||
{ | ||
"name": "Open COBOL ESQL 4J development", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "oc4j_client", | ||
"workspaceFolder": "/workspaces/Open-COBOL-ESQL-4j", | ||
"postCreateCommand": ".devcontainer/boot.sh" | ||
} |
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,28 @@ | ||
version: '3' | ||
|
||
services: | ||
oc4j_db: | ||
image: postgres:13 | ||
container_name: oc4j_db | ||
environment: | ||
- POSTGRES_USER=main_user | ||
- POSTGRES_PASSWORD=password | ||
- POSTGRES_DB=testdb | ||
ports: | ||
- "5432:5432" | ||
|
||
oc4j_client: | ||
image: oc4j_client | ||
container_name: oc4j_client | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
stdin_open: true | ||
volumes: | ||
- ../..:/workspaces:cached | ||
tty: true | ||
depends_on: | ||
oc4j_db: | ||
condition: service_started | ||
logging: | ||
driver: none |
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,11 @@ | ||
alias ls='ls --color=auto' | ||
alias ll='ls -l' | ||
alias la='ls -a' | ||
|
||
alias g='git' | ||
|
||
parse_git_branch() { | ||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | ||
} | ||
|
||
export PS1="\e[0;32m[\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\]\e[0;32m]\033[00m " |
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,4 @@ | ||
#!/bin/bash | ||
|
||
./format | ||
git add -u |