From d1167ccb633c5ca1d31e0a34dd0772f76d40527d Mon Sep 17 00:00:00 2001 From: Christopher Book Date: Wed, 31 Jul 2024 17:19:01 +0000 Subject: [PATCH] Add libreoffice devcontainer --- src/libreoffice/.devcontainer.json | 30 ++++++++++++++++++++++ src/libreoffice/README.md | 14 ++++++++++ src/libreoffice/devcontainer-template.json | 23 +++++++++++++++++ src/libreoffice/docker-compose.yaml | 24 +++++++++++++++++ 4 files changed, 91 insertions(+) create mode 100644 src/libreoffice/.devcontainer.json create mode 100644 src/libreoffice/README.md create mode 100644 src/libreoffice/devcontainer-template.json create mode 100644 src/libreoffice/docker-compose.yaml diff --git a/src/libreoffice/.devcontainer.json b/src/libreoffice/.devcontainer.json new file mode 100644 index 0000000..c954e5f --- /dev/null +++ b/src/libreoffice/.devcontainer.json @@ -0,0 +1,30 @@ +{ + "name": "Libreoffice app", + "dockerComposeFile": "docker-compose.yaml", + "service": "app", + "shutdownAction": "none", + "workspaceFolder": "/workspace", + // TODO: Enable this once Linux installation is resolved. + // "postCreateCommand": [ + // "./startupscript/post-startup.sh", + // "abc", + // "/config", + // "${templateOption:cloud}", + // "${templateOption:login}" + // ], + // // re-mount bucket files on container start up + // "postStartCommand": [ + // "./startupscript/remount-on-restart.sh", + // "abc", + // "/config", + // "${templateOption:cloud}", + // "${templateOption:login}" + // ], + "remoteUser": "root", + "features": { + // TODO: Need to install Java for the CLI, but this feature does not support alpine linux. + // "ghcr.io/devcontainers/features/java:1": { + // "version": "17" + // } + } +} diff --git a/src/libreoffice/README.md b/src/libreoffice/README.md new file mode 100644 index 0000000..f935201 --- /dev/null +++ b/src/libreoffice/README.md @@ -0,0 +1,14 @@ +# Rstudio (rstudio) + +A Template to run rstudio on workbench + +## Options + +| Options Id | Description | Type | Default Value | +| ---------- | ---------------------------------- | ------ | ------------- | +| cloud | VM cloud environment | string | gcp | +| login | Whether to log in to workbench CLI | string | false | + +--- + +_Note: This file was auto-generated from the [devcontainer-template.json](https://github.com/verily-src/workbench-app-devcontainers/blob/main/src/rstudio/devcontainer-template.json). Add additional notes to a `NOTES.md`._ diff --git a/src/libreoffice/devcontainer-template.json b/src/libreoffice/devcontainer-template.json new file mode 100644 index 0000000..7b67a13 --- /dev/null +++ b/src/libreoffice/devcontainer-template.json @@ -0,0 +1,23 @@ +{ + "id": "libreoffice", + "version": "0.1.0", + "name": "Libreoffice", + "description": "A Template to libreoffice on workbench", + "documentationURL": "https://github.com/verily-src/workbench-app-devcontainers/tree/master/src/libreoffice", + "licenseURL": "https://github.com/verily-src/workbench-app-devcontainers/blob/master/LICENSE", + "options": { + "cloud": { + "type": "string", + "description": "VM cloud environment", + "proposals": ["gcp", "aws"], + "default": "gcp" + }, + "login": { + "type": "string", + "description": "Whether to log in to workbench CLI", + "proposals": ["true", "false"], + "default": "false" + } + }, + "platforms": ["Any"] +} diff --git a/src/libreoffice/docker-compose.yaml b/src/libreoffice/docker-compose.yaml new file mode 100644 index 0000000..73b3175 --- /dev/null +++ b/src/libreoffice/docker-compose.yaml @@ -0,0 +1,24 @@ +version: "1.0" +services: + app: + container_name: "application-server" + image: "lscr.io/linuxserver/libreoffice:latest" + restart: always + volumes: + - .:/workspace:cached + - work:/config:cached + ports: + - "3000:3000" + networks: + - app-network + cap_add: + - SYS_ADMIN + devices: + - /dev/fuse + security_opt: + - apparmor:unconfined +networks: + app-network: + external: true +volumes: + work: