Added development with remote containers

This commit is contained in:
Quentin McGaw
2019-08-24 12:04:12 -04:00
parent b650a46fd8
commit ef03204561
3 changed files with 48 additions and 0 deletions

19
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
FROM golang:1.12.9-buster
ENV DEBIAN_FRONTEND=noninteractive
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=1000
RUN apt-get update && \
apt-get -y install --no-install-recommends apt-utils 2>&1 && \
apt-get -y install git && \
go get -u -v \
github.com/ramya-rao-a/go-outline \
golang.org/x/tools/cmd/gopls 2>&1 && \
groupadd --gid $USER_GID $USERNAME && \
useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME && \
apt-get install -y sudo && \
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && \
chmod 0440 /etc/sudoers.d/$USERNAME && \
apt-get autoremove -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*