-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
.gitpod.Dockerfile
22 lines (18 loc) · 1.03 KB
/
.gitpod.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM gitpod/workspace-full:latest
USER gitpod
# Install .NET SDK
# Source: https://docs.microsoft.com/dotnet/core/install/linux-scripted-manual#scripted-install
RUN mkdir -p /home/gitpod/dotnet && curl -fsSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 6.0 --install-dir /home/gitpod/dotnet
ENV DOTNET_ROOT=/home/gitpod/dotnet
ENV PATH=/home/gitpod/dotnet:$PATH
ENV PATH=/workspace/local/bin:$PATH
# TODO(toru): Remove this hack when the kernel bug is resolved.
# ref. https://github.com/gitpod-io/gitpod/issues/8901
RUN bash \
&& { echo 'if [ ! -z $GITPOD_REPO_ROOT ]; then'; \
echo '\tCONTAINER_DIR=$(awk '\''{ print $6 }'\'' /proc/self/maps | grep ^\/run\/containerd | head -n 1 | cut -d '\''/'\'' -f 1-6)'; \
echo '\tif [ ! -z $CONTAINER_DIR ]; then'; \
echo '\t\t[[ ! -d $CONTAINER_DIR ]] && sudo mkdir -p $CONTAINER_DIR && sudo ln -s / $CONTAINER_DIR/rootfs'; \
echo '\tfi'; \
echo 'fi'; } >> /home/gitpod/.bashrc.d/110-dotnet
RUN chmod +x /home/gitpod/.bashrc.d/110-dotnet