-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a844e82
commit de33ba9
Showing
2 changed files
with
15 additions
and
18 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 |
---|---|---|
@@ -1,13 +1,17 @@ | ||
# adapted from https://github.com/devcontainers/images/blob/main/src/go/.devcontainer/Dockerfile | ||
# adapted from https://medium.com/@toonsev/dev-containers-isolate-your-visual-studio-code-workspaces-a2fed6c60606 | ||
|
||
# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.19, 1.18, 1-bullseye, 1.19-bullseye, 1.18-bullseye, 1-buster, 1.19-buster, 1.18-buster | ||
ARG VARIANT=1-bullseye | ||
FROM golang:${VARIANT} | ||
FROM docker:20.10-dind-rootless | ||
# Go into root | ||
USER root | ||
# Install your dependencies, this can be changed | ||
RUN apk add git bash curl make vim go | ||
|
||
RUN go install mvdan.cc/gofumpt@latest | ||
ENV PATH="/root/go/bin:${PATH}" | ||
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.0 | ||
RUN golangci-lint --version | ||
|
||
# [Optional] Uncomment this section to install additional OS packages. | ||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
# && apt-get -y install --no-install-recommends <your-package-list-here> | ||
# Set the user back to the rootless user | ||
USER rootless | ||
# Setup docker | ||
ENV DOCKER_HOST=unix:///var/run/user/1000/docker.sock |
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