This repository has been archived by the owner on May 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add containerized development for VS code
- Loading branch information
Showing
6 changed files
with
100 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,44 @@ | ||
#------------------------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. | ||
#------------------------------------------------------------------------------------------------------------- | ||
|
||
FROM golang:1 | ||
|
||
RUN go get -u -v \ | ||
github.com/mdempsky/gocode \ | ||
github.com/uudashr/gopkgs/cmd/gopkgs \ | ||
github.com/ramya-rao-a/go-outline \ | ||
github.com/acroca/go-symbols \ | ||
golang.org/x/tools/cmd/guru \ | ||
golang.org/x/tools/cmd/gorename \ | ||
github.com/rogpeppe/godef \ | ||
github.com/zmb3/gogetdoc \ | ||
github.com/sqs/goreturns \ | ||
golang.org/x/tools/cmd/goimports \ | ||
golang.org/x/lint/golint \ | ||
github.com/alecthomas/gometalinter \ | ||
honnef.co/go/tools/... \ | ||
github.com/golangci/golangci-lint/cmd/golangci-lint \ | ||
github.com/mgechev/revive \ | ||
github.com/derekparker/delve/cmd/dlv 2>&1 | ||
|
||
# gocode-gomod | ||
RUN go get -x -d github.com/stamblerre/gocode \ | ||
&& go build -o gocode-gomod github.com/stamblerre/gocode \ | ||
&& mv gocode-gomod $GOPATH/bin/ | ||
|
||
# Install git, process tools, lsb-release (common in install instructions for CLIs) | ||
RUN apt-get update && apt-get -y install git procps lsb-release sqlite3 | ||
|
||
# Clean up | ||
RUN apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN go get -u -v \ | ||
github.com/xo/xo \ | ||
github.com/aprice/embed/cmd/embed 2>&1 | ||
|
||
# Set the default shell to bash instead of sh | ||
ENV SHELL /bin/bash |
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,22 @@ | ||
// See https://aka.ms/vscode-remote/devcontainer.json for format details. | ||
{ | ||
"name": "Go", | ||
"dockerFile": "Dockerfile", | ||
"runArgs": [ | ||
"--cap-add=SYS_PTRACE", | ||
"--security-opt", "seccomp=unconfined" | ||
], | ||
|
||
// Uncomment the next line if you want to publish any ports. | ||
"appPort": [1587, 1025, 1143, 2003], | ||
|
||
// Uncomment the next line to run commands after the container is created. | ||
// "postCreateCommand": "go version", | ||
|
||
"extensions": [ | ||
"ms-vscode.go" | ||
], | ||
"settings": { | ||
"go.gopath": "/go" | ||
} | ||
} |
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
henrymail | ||
henrymail.db | ||
henrymail.prop | ||
__debug_bin | ||
|
||
# IDE stuff | ||
.idea/ | ||
|
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,14 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "go", | ||
"request": "launch", | ||
"name": "Launch Program", | ||
"program": "${workspaceFolder}" | ||
} | ||
] | ||
} |
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,3 @@ | ||
{ | ||
"go.formatTool": "goimports" | ||
} |
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,16 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "build", | ||
"type": "shell", | ||
"command": "go generate ./... && go build", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |