File size: 2,118 Bytes
250a9db
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM gitpod/openvscode-server:latest
USER root

# RUN apt-get update && apt-get install -y \
#     curl \
#     git \
#     nodejs \
#     npm \
#     && rm -rf /var/lib/apt/lists/*

RUN apt-get update && apt-get install -y curl gnupg2 lsb-release && \
    curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
    apt-key fingerprint 1655A0AB68576280 && \
    export VERSION=node_16.x && \
    export DISTRO="$(lsb_release -s -c)" && \
    echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | tee /etc/apt/sources.list.d/nodesource.list && \
    echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | tee -a /etc/apt/sources.list.d/nodesource.list && \
    apt-get update && apt-get install -y nodejs && \
    node -v && npm -v && \
    npm install -g yarn && \
    npm install -g n8n && \
    yarn -v && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN apt-get update && \
    apt-get -y install openjdk-11-jdk-headless && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
    java -version && \
    export JAVA_HOME=$(dirname $(dirname $(update-alternatives --list java)))

RUN npm install -g pm2
RUN curl -fsSL https://tailscale.com/install.sh | sh

ENV OPENVSCODE_SERVER_ROOT="/home/.openvscode-server"
ENV OPENVSCODE="${OPENVSCODE_SERVER_ROOT}/bin/openvscode-server"

USER openvscode-server 

# # copy ms-vscode-remote.remote-ssh-0.99.2023032015.vsix file to container
# COPY ms-vscode-remote.remote-ssh-0.99.2023032015.vsix /home/.openvscode-server/extensions/ms-vscode-remote.remote-ssh-0.99.2023032015.vsix
# # install ms-vscode-remote.remote-ssh-0.99.2023032015.vsix
# RUN ${OPENVSCODE} --install-extension /home/.openvscode-server/extensions/ms-vscode-remote.remote-ssh-0.99.2023032015.vsix

RUN ${OPENVSCODE} --install-extension njzy.stats-bar
RUN ${OPENVSCODE} --install-extension cweijan.vscode-ssh
RUN ${OPENVSCODE} --install-extension humao.rest-client

EXPOSE 7860

ENTRYPOINT [ "/bin/sh", "-c", "exec ${OPENVSCODE} --host 0.0.0.0 --port 7860 --without-connection-token \"${@}\"", "--" ]