Skip to content

Commit

Permalink
new release and dev container support for development
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcelo Ochoa committed Feb 10, 2021
1 parent be32ff5 commit 370f8dd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@ FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
# [Optional] Install a version of Node.js using nvm for front end dev
ARG INSTALL_NODE="true"
ARG NODE_VERSION="lts/*"
ARG DOCKER_GID
ENV DOCKER_GID ${DOCKER_GID:-999}
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# [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>
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends apt-transport-https ca-certificates curl gnupg2 software-properties-common \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - \
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" \
&& apt-get update && apt-get -y install docker-ce docker-ce-cli containerd.io \
&& usermod -G ${DOCKER_GID} vscode

# [Optional] Uncomment the next line to use go get to install anything else you need
# RUN go get -x <your-dependency-or-tool>
Expand Down
12 changes: 7 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@
"VARIANT": "1",
// Options
"INSTALL_NODE": "false",
"NODE_VERSION": "lts/*"
"NODE_VERSION": "lts/*",
"DOCKER_GID": "999"
}
},
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined","-v", "/var/run/docker.sock:/var/run/docker.sock:rw" ],

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"go.useGoProxyToCheckForToolUpdates": false,
"go.toolsManagement.checkForUpdates": "off",
"go.gopath": "/go",
"go.useLanguageServer": true
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-azuretools.vscode-docker",
"golang.Go"
],

Expand All @@ -34,8 +36,8 @@
// "postCreateCommand": "go version",

"workspaceMount": "source=${localWorkspaceFolder},target=/go/src/github.com/marcelo-ochoa/docker-volume-plugins,type=bind,consistency=delegated",
//"workspaceFolder": "/go/src/github.com/marcelo-ochoa/docker-volume-plugins",
"workspaceFolder": "/go/src/github.com/marcelo-ochoa/docker-volume-plugins",

// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
//"remoteUser": "vscode"
"remoteUser": "vscode"
}
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ build() {
docker plugin create mochoa/$1 build
else
docker plugin create mochoa/$1:$TAG build
#docker plugin push mochoa/$1:$TAG
docker plugin push mochoa/$1:$TAG
fi
}
build glusterfs-volume-plugin
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docker-volume-plugins",
"version": "2.0.5",
"version": "2.0.6",
"description": "Docker Managed Volume Plugins\r =============================",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 370f8dd

Please sign in to comment.