Skip to content

Commit

Permalink
add devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
Michelle Laurenti committed Jun 13, 2024
1 parent 2bcd39e commit bd32b2d
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM ghcr.io/oracle/oraclelinux8-instantclient:21

RUN dnf config-manager --add-repo https://mise.jdx.dev/rpm/mise.repo

RUN dnf install -y git zip unzip dnf-plugins-core go-toolset mise

RUN dnf groupinstall "Development Tools"

RUN useradd -m devcontainer
20 changes: 20 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"dockerComposeFile": "../docker-compose.yml",
"service": "devcontainer",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.vscode-docker",
"peterj.proto",
"pomdtr.excalidraw-editor",
"vscodevim.vim",
"golang.Go",
"GitHub.vscode-github-actions"
]
}
},
"remoteUser": "devcontainer",
"containerUser": "devcontainer",
"updateRemoteUserUID": true
}
21 changes: 21 additions & 0 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Dev container

on:
push:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Build image
run: docker build . --file .devcontainer/Dockerfile --tag ghcr.io/moveaxlab/oracle-devcontainer:latest
- name: Log in to the registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Push image
run: docker push ghcr.io/moveaxlab/oracle-devcontainer:latest

24 changes: 24 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: "3.1"

services:
devcontainer:
image: ghcr.io/moveaxlab/oracle-devcontainer:latest
volumes:
- .:/workspaces/oracle:cached
command: sleep infinity

oracle-19c:
image: ghcr.io/oracle/adb-free:latest # https://github.com/oracle/adb-free
ports:
- 1521:1521
environment:
ADMIN_PASSWORD: TVDGXvpzQat8
WALLET_PASSWORD: tkmXp6Ug

oracle-23c:
image: container-registry.oracle.com/database/free:latest
ports:
- 1522:1521
environment:
ORACLE_PWD: password

0 comments on commit bd32b2d

Please sign in to comment.