Skip to content

Commit

Permalink
vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
stamepicmorg committed Nov 19, 2021
1 parent 196a494 commit 5734fed
Show file tree
Hide file tree
Showing 13 changed files with 448 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,12 @@ ecosystem-images:
cd `pwd`/linux/ecosystem/nginx/latest/php && pwd && make
cd `pwd`/linux/ecosystem/nginx/latest/rtmp-hls && pwd && make
cd `pwd`/linux/ecosystem/nginx/latest/quic && pwd && make

cd `pwd`/linux/advanced/vscode-server/latest && pwd && make
cd `pwd`/linux/advanced/vscode-server/devops && pwd && make

cd `pwd`/linux/advanced/vscode-server/amxx && pwd && make
cd `pwd`/linux/advanced/vscode-server/android && pwd && make
cd `pwd`/linux/advanced/vscode-server/cpp && pwd && make
cd `pwd`/linux/advanced/vscode-server/docker && pwd && make
cd `pwd`/linux/advanced/vscode-server/dotnet && pwd && make
39 changes: 39 additions & 0 deletions bin/docker-compose-update
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

export DOCKER_COMPOSE_REMOTE_VERSION=`curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r`

export DOCKER_COMPOSE_LOCAL_VERSION=`docker-compose -v`

export DOCKER_COMPOSE_BIN=/usr/local/bin/docker-compose

if [ -f $DOCKER_COMPOSE_BIN ]; then
echo "========================================================================================"
echo "The file '$DOCKER_COMPOSE_BIN' exists."
echo "========================================================================================"
echo "Local Docker Compose version is: ${DOCKER_COMPOSE_LOCAL_VERSION}"
echo "========================================================================================"
else
echo "========================================================================================"
echo "The file '$DOCKER_COMPOSE_BIN' in not found. Installing..."
echo "========================================================================================"
fi

echo "========================================================================================"
echo "Latest Docker Compose version is: ${DOCKER_COMPOSE_REMOTE_VERSION}"
echo "========================================================================================"


echo "========================================================================================"
echo "Installing remote version:"
echo "========================================================================================"
curl -SL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_REMOTE_VERSION}/docker-compose-Linux-x86_64 -o $DOCKER_COMPOSE_BIN

echo "========================================================================================"
echo "Setting up permissions..."
echo "========================================================================================"
chmod +x $DOCKER_COMPOSE_BIN


echo "========================================================================================"
echo "Updated Docker Compose version is: ${DOCKER_COMPOSE_LOCAL_VERSION}"
echo "========================================================================================"
125 changes: 125 additions & 0 deletions linux/advanced/vscode-server/cpp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
################################################################################
# https://github.com/linuxserver/docker-code-server/pkgs/container/code-server
################################################################################
FROM epicmorg/vscode-server:latest

LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
ARG DEBIAN_FRONTEND=noninteractive

##################################################################
# ARGuments
##################################################################
ENV BuildDocker true
ARG NINJA_ARCH=linux
ARG NINJA_VERSION=latest
ARG NINJA_RELEASE_URL=https://api.github.com/repos/ninja-build/ninja/releases/${NINJA_VERSION}

##################################################################
# deps
##################################################################
RUN apt-get update && \
apt install -y --allow-unauthenticated --allow-downgrades \
build-essential \
autoconf-archive \
gnu-standards \
cmake \
libunwind-dev \
golang \
at \
autopkgtest \
gcc-multilib \
g++-multilib \
libxkbcommon-dev \
zlib1g-dev \
libfreetype6-dev \
libegl1-mesa-dev \
libgles2-mesa-dev \
libgbm-dev \
uuid-dev \
nvidia-cg-toolkit \
nvidia-cg-dev \
libavcodec-dev \
libsdl2-dev \
libsdl-image1.2-dev \
libxml2-dev \
yasm \
devscripts \
automake \
libtool \
autotools-dev \
dpkg-dev \
fakeroot \
checkinstall \
dh-make \
zlib1g \
zlib1g-dev \
libssl-dev \
libxslt-dev \
libgd-dev \
libpcre3-dev \
libgeoip-dev \
libkrb5-dev \
libperl-dev \
krb5-user \
luajit \
liblua5.1-0-dev \
libmaxminddb-dev \
libpam0g-dev \
libldap2-dev \
libavformat-dev \
libavfilter-dev \
libswscale-dev \
libavcodec-dev \
libz-dev \
libhiredis-dev \
libzip-dev \
libcrypto++-dev \
libbz2-dev \
libvpx-dev \
libvpx6 \
libc6 \
libgssapi-krb5-2 \
liblttng-ust0 \
libssl1.1 \
libstdc++6 \
zlib1g \
tcl

##################################################################
# Get NINJA binary
##################################################################
RUN curl -s ${NINJA_RELEASE_URL} | jq -r ".assets[] | select(.name | test(\"${NINJA_ARCH}\")) | .browser_download_url" > /tmp/ninja-url.txt && \
cat /tmp/ninja-url.txt && \
cd /tmp && \
wget -q -c --input-file=/tmp/ninja-url.txt && \
unzip -o /tmp/ninja-linux.zip -d /bin && \
printf "\n--------------------------------\nninja version: $(ninja --version)\n--------------------------------\n\n"

##################################################################
# steam runtime and ssdk
##################################################################
RUN cd / && \
sudo mkdir valve && \
cd valve && \
sudo wget http://media.steampowered.com/client/runtime/steam-runtime-sdk_latest.tar.xz && \
sudo tar xvf steam-runtime-sdk_latest.tar.xz && \
sudo mv steam-runtime-sdk_2013-09-05 steam-runtime && \
sudo chown root:root * -R && \
cd steam-runtime && \
printf '%s\n' 3 1 Y Y Y | ./setup.sh

##################################################################
# cleaninig up
##################################################################
RUN apt purge policykit-1 -y && \
apt clean -y && \
apt autoclean -y && \
rm -rfv /var/lib/apt/lists/* && \
rm -rfv /tmp/mc.patch && \
rm -rfv /var/cache/apt/archives/*.deb && \
rm -rfv /tmp/7z && \
rm -rfv /tmp/deb/* && \
rm -rfv /tmp/composer-setup.php && \
rm -rfv /tmp/amxx_base_latest.tar.gz && \
rm -rfv /tmp/atlassian-plugin-sdk.deb && \
rm -rfv /tmp/addons
19 changes: 19 additions & 0 deletions linux/advanced/vscode-server/cpp/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
all: app

app:
make build
make deploy
make clean

build:
docker-compose build --compress --parallel

deploy:
docker-compose push

clean:
docker container prune -f
docker image prune -f
docker network prune -f
docker volume prune -f
docker system prune -af
6 changes: 6 additions & 0 deletions linux/advanced/vscode-server/cpp/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '3.9'
services:
app:
image: "epicmorg/vscode-server:cpp"
build:
context: .
68 changes: 68 additions & 0 deletions linux/advanced/vscode-server/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
################################################################################
# https://github.com/linuxserver/docker-code-server/pkgs/container/code-server
################################################################################
FROM epicmorg/vscode-server:latest

LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
ARG DEBIAN_FRONTEND=noninteractive

##################################################################
# ARGuments
##################################################################
ENV BuildDocker true


##################################################################
# docker setup
##################################################################

#Install packages
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
echo 'deb https://download.docker.com/linux/ubuntu focal test' > /etc/apt/sources.list.d/docker.list && \
apt-cache policy docker-ce && \
apt-get update && \
apt-get install -y --no-install-recommends --allow-unauthenticated \
docker-ce \
docker-ce-cli \
containerd.io systemd && \
systemctl disable docker

# A better fix for TW-52939 Dockerfile build fails because of aufs
VOLUME /var/lib/docker

COPY run-docker.sh /services/run-docker.sh
RUN chmod +x /services/run-docker.sh && \
sync

##################################################################
# docker compose setup
##################################################################
COPY docker-compose-update /usr/local/bin/docker-compose-update
RUN chmod +x /usr/local/bin/docker-compose-update && \
sync

#Try to test
RUN docker-compose-update

#Install packages
RUN export DOCKER_COMPOSE_VERSION=`curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r` && \
echo "Latest compose is: ${DOCKER_COMPOSE_VERSION}" && \
curl -SL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-Linux-x86_64 -o /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose && \
docker-compose -v

##################################################################
# cleaninig up
##################################################################
RUN apt purge policykit-1 -y && \
apt clean -y && \
apt autoclean -y && \
rm -rfv /var/lib/apt/lists/* && \
rm -rfv /tmp/mc.patch && \
rm -rfv /var/cache/apt/archives/*.deb && \
rm -rfv /tmp/7z && \
rm -rfv /tmp/deb/* && \
rm -rfv /tmp/composer-setup.php && \
rm -rfv /tmp/amxx_base_latest.tar.gz && \
rm -rfv /tmp/atlassian-plugin-sdk.deb && \
rm -rfv /tmp/addons
19 changes: 19 additions & 0 deletions linux/advanced/vscode-server/docker/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
all: app

app:
make build
make deploy
make clean

build:
docker-compose build --compress --parallel

deploy:
docker-compose push

clean:
docker container prune -f
docker image prune -f
docker network prune -f
docker volume prune -f
docker system prune -af
39 changes: 39 additions & 0 deletions linux/advanced/vscode-server/docker/docker-compose-update
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

export DOCKER_COMPOSE_REMOTE_VERSION=`curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r`

export DOCKER_COMPOSE_LOCAL_VERSION=`docker-compose -v`

export DOCKER_COMPOSE_BIN=/usr/local/bin/docker-compose

if [ -f $DOCKER_COMPOSE_BIN ]; then
echo "========================================================================================"
echo "The file '$DOCKER_COMPOSE_BIN' exists."
echo "========================================================================================"
echo "Local Docker Compose version is: ${DOCKER_COMPOSE_LOCAL_VERSION}"
echo "========================================================================================"
else
echo "========================================================================================"
echo "The file '$DOCKER_COMPOSE_BIN' in not found. Installing..."
echo "========================================================================================"
fi

echo "========================================================================================"
echo "Latest Docker Compose version is: ${DOCKER_COMPOSE_REMOTE_VERSION}"
echo "========================================================================================"


echo "========================================================================================"
echo "Installing remote version:"
echo "========================================================================================"
curl -SL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_REMOTE_VERSION}/docker-compose-Linux-x86_64 -o $DOCKER_COMPOSE_BIN

echo "========================================================================================"
echo "Setting up permissions..."
echo "========================================================================================"
chmod +x $DOCKER_COMPOSE_BIN


echo "========================================================================================"
echo "Updated Docker Compose version is: ${DOCKER_COMPOSE_LOCAL_VERSION}"
echo "========================================================================================"
6 changes: 6 additions & 0 deletions linux/advanced/vscode-server/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '3.9'
services:
app:
image: "epicmorg/vscode-server:docker"
build:
context: .
7 changes: 7 additions & 0 deletions linux/advanced/vscode-server/docker/run-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [ "$DOCKER_IN_DOCKER" = "start" ] ; then
rm /var/run/docker.pid 2>/dev/null
service docker start
echo "Docker daemon started"
fi
Loading

0 comments on commit 5734fed

Please sign in to comment.