@@ -8,15 +8,16 @@ EXPOSE 9443
8
8
EXPOSE 9000
9
9
EXPOSE 8000
10
10
11
+ USER yajith
12
+
11
13
# Set TERM as noninteractive to suppress debconf errors
12
- # RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
13
- # ARG DEBIAN_FRONTEND=noninteractive
14
+ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
14
15
15
16
# Set default go version
16
17
ARG GO_VERSION=go1.22.6.${TARGETOS}-${TARGETARCH}
17
18
18
19
# Install packages
19
- RUN sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install -yq \
20
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq \
20
21
dialog \
21
22
apt-utils \
22
23
curl \
@@ -32,37 +33,37 @@ RUN sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install -
32
33
iputils-ping \
33
34
nano \
34
35
software-properties-common \
35
- && sudo rm -rf /var/lib/apt/lists/*
36
+ && rm -rf /var/lib/apt/lists/*
36
37
37
38
# Install Docker CLI
38
- RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - \
39
- && sudo add-apt-repository \
39
+ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
40
+ && add-apt-repository \
40
41
"deb [arch=${TARGETARCH}] https://download.docker.com/linux/ubuntu \
41
42
$(lsb_release -cs) \
42
43
stable" \
43
- && sudo apt-get update \
44
- && sudo apt-get install -y docker-ce-cli
44
+ && apt-get update \
45
+ && apt-get install -y docker-ce-cli
45
46
46
47
# Install NodeJS
47
- RUN curl -fsSL https://deb.nodesource.com/setup_18.x | sudo bash - \
48
- && sudo apt-get install -y nodejs
48
+ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
49
+ && apt-get install -y nodejs
49
50
50
51
# Install Yarn
51
- RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - \
52
- && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list \
53
- && sudo apt-get update && apt-get -y install yarn
52
+ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
53
+ && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
54
+ && apt-get update && apt-get -y install yarn
54
55
55
56
# Install Golang
56
57
RUN cd /tmp \
57
58
&& wget -q https://dl.google.com/go/${GO_VERSION}.tar.gz \
58
59
&& tar -xf ${GO_VERSION}.tar.gz \
59
- && sudo mv go /usr/local
60
+ && mv go /usr/local
60
61
61
62
# Install golangci-lint
62
- RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /home/yajith /go/bin v1.60.3
63
+ RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /root /go/bin v1.60.3
63
64
64
65
# Configuring Golang
65
- ENV PATH="$PATH:/usr/local/go/bin:/home/yajith /go/bin"
66
+ ENV PATH="$PATH:/usr/local/go/bin:/root /go/bin"
66
67
67
68
# Install VSCode extensions
68
69
@@ -79,4 +80,4 @@ RUN EXT_PUBLISHER=golang EXT_PACKAGE=Go && \
79
80
# # Docker extension ID: ms-azuretools.vscode-docker
80
81
RUN EXT_PUBLISHER=ms-azuretools EXT_PACKAGE=vscode-docker && \
81
82
mkdir -pv "/home/workspace/.openvscode-server/extensions/${EXT_PUBLISHER}.${EXT_PACKAGE}" && \
82
- 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}"
83
+ 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}"
0 commit comments