Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(devcontainer): setup a development environment with development tooling #38

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Use the Ubtuntu base image
FROM ubuntu:22.04

# Download development tools
RUN apt-get update
RUN apt-get install -y curl
RUN apt-get install -y git
RUN apt-get install -y unzip

# Run the container as a user
RUN useradd -m -s /bin/bash slackdev
RUN chown slackdev /usr/local/bin
USER slackdev

# Install the project runtime
RUN curl -fsSL https://deno.land/install.sh | sh
RUN export DENO_INSTALL="/home/slackdev/.deno"
RUN export PATH="$DENO_INSTALL/bin:$PATH"

# Set the working directory
WORKDIR /workspaces

# Install the Slack CLI
RUN curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash -s -- -d
35 changes: 35 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# .devcontainer

A [development container][container] provides a predefined environment with
some tools needed for development, which can be useful in editors such as
[Visual Studio Code][vscode] or remote settings like [Codespaces][codespaces].

This specific container packages [the Slack CLI][cli] with the project runtime
and a few development tools. The `Dockerfile` details the container.

## Editor extensions

Modifications to an editor can be made with changes to the `devcontainer.json`
file:

```diff
{
"customizations": {
"vscode": {
"extensions": [
+ "GitHub.copilot",
"denoland.vscode-deno",
"ms-azuretools.vscode-docker"
],
+ "settings": {
+ "terminal.integrated.defaultProfile.linux": "zsh"
+ }
}
}
}
```

[codespaces]: https://github.com/features/codespaces
[cli]: https://api.slack.com/automation/cli
[container]: https://containers.dev/
[vscode]: https://code.visualstudio.com/docs/devcontainers/containers
13 changes: 13 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Slack Platform",
"dockerFile": "Dockerfile",
"remoteUser": "slackdev",
"customizations": {
"vscode": {
"extensions": [
"denoland.vscode-deno",
"ms-azuretools.vscode-docker"
]
}
}
}
Loading