-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
95 lines (76 loc) · 3.5 KB
/
Dockerfile
File metadata and controls
95 lines (76 loc) · 3.5 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
# ----------------------------------------------------------------------------------------
# BUILD STAGE
# ----------------------------------------------------------------------------------------
ARG BASEIMAGE_CODE=ubuntu:22.04
FROM ${BASEIMAGE_CODE}
LABEL maintainer="aus der Technik"
LABEL Description="UItsmijter - Code-Server"
# Install OS updates and, if needed
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
RUN apt-get update && apt-get install -y apt-utils apt-transport-https
RUN apt update \
&& apt dist-upgrade -y
RUN apt install -y \
libz-dev \
curl libcurl4-openssl-dev wget \
gnupg openssh-client \
git git-lfs jq unzip \
libjavascriptcoregtk-4.0-dev \
python3.10 libpython3.10 python3-pip \
binutils \
glibc-tools gcc \
cmake \
sudo
# Setting up Project dir
# ----------------------------------------------------------------------------------------
RUN mkdir /Project && chmod 777 /Project
COPY scripts/entrypoint.sh /entrypoint.sh
# Install Swift
# ----------------------------------------------------------------------------------------
ARG SWIFT_VERSION
ENV SWIFT_VERSION=${SWIFT_VERSION}
# Install Swift (Swiftly)
# ----------------------------------------------------------------------------------------
WORKDIR /opt/swiftly
RUN curl -o /opt/swiftly/swiftly.tar.gz https://download.swift.org/swiftly/linux/swiftly-$(uname -m).tar.gz
RUN tar zxf swiftly.tar.gz && \
./swiftly init --quiet-shell-followup -y && \
./swiftly install --use ${SWIFT_VERSION} && \
. ~/.local/share/swiftly/env.sh && \
hash -r \
RUN echo 'source /root/.local/share/swiftly/env.sh' >> /root/.bashrc
RUN /root/.local/share/swiftly/bin/swift --version
RUN ln -s /root/.local/share/swiftly/bin/swift /usr/bin/swift
WORKDIR /build
# Install NodeJS
# ----------------------------------------------------------------------------------------
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs
# Install Code-Server
# ----------------------------------------------------------------------------------------
RUN mkdir -p /extensions/install
RUN chmod -R 777 /extensions
ADD extensions/*.vsix /extensions/install/
RUN curl -fsSL https://code-server.dev/install.sh | sh
# Download sswg.swift-lang extension (See https://github.com/swift-server/vscode-swift/issues/698)
# RUN curl "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/sswg/vsextensions/swift-lang/1.8.0/vspackage" --output "/extensions/install/swift-lang.vsix"
# Install public extensions
RUN for ext in vadimcn.vscode-lldb zaaack.markdown-editor ms-toolsai.jupyter ms-python.python; do \
code-server --disable-telemetry --extensions-dir /extensions --install-extension ${ext}; \
done;
# Install user extensions
RUN for ext in $(find /extensions/install/ -name "*.vsix"); do \
code-server --disable-telemetry --extensions-dir /extensions --install-extension ${ext}; \
done;
RUN rm -rf /extensions/install/*
# Install Kernels
# ----------------------------------------------------------------------------------------
RUN pip install bash_kernel; python3 -m bash_kernel.install
# Setup System Preferences
# ----------------------------------------------------------------------------------------
ENV MAX_USER_INSTANCES=2048
# Setting the startp
# ----------------------------------------------------------------------------------------
WORKDIR /Project
COPY scripts/config.yaml /root/.config/code-server/config.yaml
EXPOSE 31546
ENTRYPOINT ["/entrypoint.sh"]