forked from portainer/dev-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
83 lines (67 loc) · 3.1 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
FROM yajithd/openvscode-server:1.92.1
ARG TARGETOS
ARG TARGETARCH
EXPOSE 3000
EXPOSE 9443
EXPOSE 9000
EXPOSE 8000
USER yajith
# Set TERM as noninteractive to suppress debconf errors
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# Set default go version
ARG GO_VERSION=go1.22.6.${TARGETOS}-${TARGETARCH}
# Install packages
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq \
dialog \
apt-utils \
curl \
build-essential \
git \
jq \
wget \
apt-transport-https \
ca-certificates \
gnupg-agent \
libarchive-tools \
openssh-client \
iputils-ping \
nano \
software-properties-common \
&& rm -rf /var/lib/apt/lists/*
# Install Docker CLI
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
&& add-apt-repository \
"deb [arch=${TARGETARCH}] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable" \
&& apt-get update \
&& apt-get install -y docker-ce-cli
# Install NodeJS
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs
# Install Yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update && apt-get -y install yarn
# Install Golang
RUN cd /tmp \
&& wget -q https://dl.google.com/go/${GO_VERSION}.tar.gz \
&& tar -xf ${GO_VERSION}.tar.gz \
&& mv go /usr/local
# Install golangci-lint
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /root/go/bin v1.60.3
# Configuring Golang
ENV PATH="$PATH:/usr/local/go/bin:/root/go/bin"
# Install VSCode extensions
## Note: The most convenient way to install these would be during image build time
## via the vscode CLI: https://code.visualstudio.com/docs/editor/extension-marketplace#_command-line-extension-management
## However, it is currently not possible to automate the installation of the extensions this way,
## see: https://github.com/gitpod-io/openvscode-server/issues/94
## Golang extension ID: golang.Go
RUN EXT_PUBLISHER=golang EXT_PACKAGE=Go && \
mkdir -pv "/home/workspace/.openvscode-server/extensions/${EXT_PUBLISHER}.${EXT_PACKAGE}" && \
curl -sSL "https://${EXT_PUBLISHER}.gallery.vsassets.io/_apis/public/gallery/publisher/${EXT_PUBLISHER}/extension/${EXT_PACKAGE}/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage" | bsdtar xvf - --strip-components=1 -C "/home/workspace/.openvscode-server/extensions/${EXT_PUBLISHER}.${EXT_PACKAGE}"
## Docker extension ID: ms-azuretools.vscode-docker
RUN EXT_PUBLISHER=ms-azuretools EXT_PACKAGE=vscode-docker && \
mkdir -pv "/home/workspace/.openvscode-server/extensions/${EXT_PUBLISHER}.${EXT_PACKAGE}" && \
curl -sSL "https://${EXT_PUBLISHER}.gallery.vsassets.io/_apis/public/gallery/publisher/${EXT_PUBLISHER}/extension/${EXT_PACKAGE}/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage" | bsdtar xvf - --strip-components=1 -C "/home/workspace/.openvscode-server/extensions/${EXT_PUBLISHER}.${EXT_PACKAGE}"