From 459751fcc67367dc692b62127251d9b149e39e3b Mon Sep 17 00:00:00 2001 From: NeonXP Date: Sat, 27 Jan 2024 05:38:59 +0300 Subject: [PATCH] Fix make --- Dockerfile | 17 +++++++++-------- devcontainer.json | 3 +-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 41b124d..f949369 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,17 @@ -FROM ubuntu:latest +ARG ARCH= +FROM ${ARCH}ubuntu:latest RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && \ - apt-get -y install software-properties-common ca-certificates curl && \ - add-apt-repository ppa:longsleep/golang-backports && \ - apt-get -y install --no-install-recommends gnupg2 procps sudo git libpq-dev golang -RUN useradd -m -d /home/vscode -s /bin/bash vscode && adduser vscode sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + apt-get -y install software-properties-common ca-certificates curl && \ + add-apt-repository ppa:longsleep/golang-backports && \ + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_21.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ + apt-get -y install --no-install-recommends gnupg2 procps sudo git libpq-dev make golang nodejs npm && \ + apt-get update && \ + useradd -m -d /home/vscode -s /bin/bash vscode && adduser vscode sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers USER vscode -RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash RUN go install github.com/go-delve/delve/cmd/dlv@latest RUN go install golang.org/x/tools/gopls@latest RUN go install github.com/cweill/gotests/gotests@v1.6.0 @@ -18,5 +21,3 @@ RUN go install github.com/haya14busa/goplay/cmd/goplay@v1.0.0 RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2 SHELL ["/bin/bash", "-c", "-l"] - -# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 diff --git a/devcontainer.json b/devcontainer.json index f713571..2ea16fa 100644 --- a/devcontainer.json +++ b/devcontainer.json @@ -16,8 +16,7 @@ "humao.rest-client", "mtxr.sqltools", "mtxr.sqltools-driver-pg", - "codezombiech.gitignore", - "ms-azuretools.vscode-docker" + "codezombiech.gitignore" ] } }