Skip to content
Open
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
12 changes: 12 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ARG GOLANG_VERSION=1.25
ARG GOLANGCI_VERSION=v2.1.0

FROM mcr.microsoft.com/devcontainers/go:${GOLANG_VERSION} AS go_builder
ARG GOLANGCI_VERSION
RUN GOBIN=/usr/local/go/bin go install github.com/go-task/task/v3/cmd/task@latest
RUN GOBIN=/usr/local/go/bin go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@${GOLANGCI_VERSION}

FROM mcr.microsoft.com/devcontainers/go:${GOLANG_VERSION}
ENV DEBIAN_FRONTEND=noninteractive
COPY --from=go_builder /usr/local/go/bin/task /usr/local/go/bin/task
COPY --from=go_builder /usr/local/go/bin/golangci-lint /usr/local/go/bin/golangci-lint
17 changes: 17 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Task Devcontainer

### Open Task in a container

1. Start VS Code, run the __Dev Containers: Open Folder in Container...__ command from the Command Palette (F1) or quick actions Status bar item, and select the `task` folder you would like to open.


### Open Task branch or PR in an isolated container

1. Start VS Code and run __Dev Containers: Clone Repository in Container Volume...__ or from the Command Palette

2. Enter https://github.com/go-task/task or a GitHub PR URL (e.g. https://github.com/go-task/task/pull/1067) in the input box that appears and press Enter.


### More Info

Developing inside a Container : https://code.visualstudio.com/docs/devcontainers/containers
11 changes: 11 additions & 0 deletions .devcontainer/devcontainer.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

# Experiments
TASK_X_ENV_PRECEDENCE=0
TASK_X_GENTLE_FORCE=0
TASK_X_REMOTE_TASKFILES=0

# Variables
#TASK_CORE_UTILS
#TASK_OFFLINE
#TASK_REMOTE_DIR=./.task
#TASK_TEMP_DIR=./.task
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "Task Devcontainer",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"customizations": {
"vscode": {
"extensions": [
"editorconfig.editorconfig",
"golang.go",
"streetsidesoftware.code-spell-checker",
"task.vscode-task"
]
}
},
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": false
},
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {}
},
"runArgs": [
"--env-file", ".devcontainer/devcontainer.env"
]
}