Bosque Programming Language - Development Environment
909
This repository provides a Dockerfile to build a fully functional Bosque Development Environment. You can either use prebuilt Docker images or build your own image locally.
Prebuilt Docker images are available here.
Pull the image directly using Docker:
docker pull brakmic/bosquedev:latest
To build the Docker image yourself:
Clone this repository.
Build the Docker image using the following command:
docker build -t your_user_prefix/bosquedev:latest .
The build process will automatically clone the BosqueCore repository during the build stage, so no additional manual steps are required.
Run the container interactively with a mounted volume to persist your session.
docker run --rm -it -v $(pwd):/session your_user_prefix/bosquedev:latest
PowerShell:
docker run --rm -it -v ${PWD}:/session your_user_prefix/bosquedev:latest
Command Prompt (CMD):
docker run --rm -it -v %cd%:/session your_user_prefix/bosquedev:latest
Git Bash or WSL:
docker run --rm -it -v $(pwd):/session your_user_prefix/bosquedev:latest
You can use the provided Dockerfile as a development container in VS Code to streamline development.
A devcontainer is a containerized development environment that allows you to work in a consistent and isolated environment directly from your code editor.

Install Required Extensions:
Open the Devcontainer Options:
Cmd+Shift+P.Ctrl+Shift+P.Dev Containers: Open Folder in Container....Select the Dockerfile:
From 'Dockerfile'.Configure the DevContainer (Optional):
Ensure there is a .devcontainer folder in the root of your project with a devcontainer.json file. If it does not exist, create it with the following content:
{
"name": "Bosque DevContainer",
"build": {
"dockerfile": "../Dockerfile"
},
"workspaceFolder": "/workspace",
"workspaceMount": "source=${localWorkspaceFolder},target=/host_workspace,type=bind,consistency=cached",
"customizations": {
"vscode": {
"settings": {
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true
}
}
}
},
"mounts": [
"source=${localWorkspaceFolder}/scripts/setup-workspace.mjs,target=/workspace/scripts/setup-workspace.mjs,type=bind"
],
"postCreateCommand": "node /workspace/scripts/setup-workspace.mjs && ln -sf /workspace/dev.code-workspace /home/bosquedev/.vscode-server/dev.code-workspace",
"remoteUser": "bosquedev"
}
Build and Open the DevContainer:
bosque in the integrated terminal to ensure the command is globally available./host_workspace folder contains your project files.In addition to the standard devcontainer setup, you have the option to create and use a VS Code workspace that includes both the devcontainer's /workspace directory and the mounted /host_workspace directory. This allows you to access and work on files from both the container and your local machine within the same workspace.

Ensure DevContainer is Running:
Create the Workspace File:
setup-workspace.mjs) that generates a workspace file named dev.code-workspace containing both /workspace and /host_workspace./workspace directory inside the container.Open the Workspace in VS Code:
Manual Method:
dev.code-workspace file within the container's /workspace directory.dev.code-workspace file to open it.dev.code-workspace file in your file explorer to open it directly in VS Code.
Using Symbolic Link:
postCreateCommand in devcontainer.json creates a symbolic link to the workspace file at /home/bosquedev/.vscode-server/dev.code-workspace.dev.code-workspace file.Verify Workspace Contents:
/workspace and /host_workspace folders in the VS Code Explorer pane.bosque Command: The bosque command is globally available, enabling straightforward execution of Bosque scripts.

Contributions are welcome! Feel free to submit issues or pull requests to improve this repository.
This project is licensed under the MIT License.
Content type
Image
Digest
sha256:41f830304…
Size
696 MB
Last updated
over 1 year ago
docker pull brakmic/bosquedev