This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
generated from slack-samples/deno-starter-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(devcontainer): setup a development environment with development…
… tooling (#40)
- Loading branch information
1 parent
0d4cdc1
commit 57368ec
Showing
3 changed files
with
72 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,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 |
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,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 |
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,13 @@ | ||
{ | ||
"name": "Slack Platform", | ||
"dockerFile": "Dockerfile", | ||
"remoteUser": "slackdev", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"denoland.vscode-deno", | ||
"ms-azuretools.vscode-docker" | ||
] | ||
} | ||
} | ||
} |