From 80ffa68fde6865414bbee09dfaf9c3e8f23126b6 Mon Sep 17 00:00:00 2001 From: Anatolii Zimovskii Date: Sat, 20 Nov 2021 00:42:23 +0300 Subject: [PATCH] vscode --- .../vscode-server/{ => devops}/Dockerfile | 109 ++---------------- .../vscode-server/{ => devops}/Makefile | 0 .../{ => devops}/docker-compose-update | 20 +++- .../{ => devops}/docker-compose.yml | 2 +- .../vscode-server/{ => devops}/run-docker.sh | 0 5 files changed, 27 insertions(+), 104 deletions(-) rename linux/advanced/vscode-server/{ => devops}/Dockerfile (81%) rename linux/advanced/vscode-server/{ => devops}/Makefile (100%) rename linux/advanced/vscode-server/{ => devops}/docker-compose-update (58%) rename linux/advanced/vscode-server/{ => devops}/docker-compose.yml (58%) rename linux/advanced/vscode-server/{ => devops}/run-docker.sh (100%) diff --git a/linux/advanced/vscode-server/Dockerfile b/linux/advanced/vscode-server/devops/Dockerfile similarity index 81% rename from linux/advanced/vscode-server/Dockerfile rename to linux/advanced/vscode-server/devops/Dockerfile index e04655be8..fbbffc594 100644 --- a/linux/advanced/vscode-server/Dockerfile +++ b/linux/advanced/vscode-server/devops/Dockerfile @@ -1,13 +1,11 @@ ################################################################################ # https://github.com/linuxserver/docker-code-server/pkgs/container/code-server ################################################################################ -FROM ghcr.io/linuxserver/code-server:focal +FROM epicmorg/vscode-server:latest LABEL maintainer="EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive -USER root - ################################################################## # ARGuments ################################################################## @@ -16,97 +14,6 @@ ARG NINJA_ARCH=linux ARG NINJA_VERSION=latest ARG NINJA_RELEASE_URL=https://api.github.com/repos/ninja-build/ninja/releases/${NINJA_VERSION} -################################################################## -# 7z official binary -################################################################## -ENV SZ_VERSION=7z2103 -ENV SZ_DOWNLOAD_URL=https://www.7-zip.org/a/${SZ_VERSION}-linux-x64.tar.xz - -################################################################## -# installing utils -################################################################## -# libzip4 \ -# lbzip2 \ -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \ - apt-get update && \ - apt-get install -y --allow-unauthenticated \ - apt-transport-https \ - apt-utils \ - aptitude \ - bash \ - binutils \ - bzip2 \ - ca-certificates \ - cmatrix \ - cmatrix-xfont \ - console-cyrillic \ - cron \ - curl \ - clzip \ - dos2unix \ - ffmpeg \ - fontconfig \ - git \ - gnupg \ - gnupg2 \ - graphicsmagick \ - gzip \ - htop \ - iftop \ - iputils-ping \ - jq \ - kmod \ - libxml2-dev \ - libxml2-utils \ - libsvn-java \ - locales \ - lsb-release \ - lsof \ - lynx \ - lzma \ - lzip \ - lzop \ - mc \ - mercurial \ - nano \ - nload \ - nmap \ - openssl \ - perl \ - procps \ - pbzip2 \ - plzip \ - p7zip-full \ - p7zip-rar \ - rsync \ - rar \ - screenfetch \ - smbclient \ - software-properties-common \ - subversion \ - sudo \ - telnet \ - tini \ - tmux \ - tree \ - util-linux \ - uuid-runtime \ - unrar \ - xz-utils \ - wget \ - zip - -################################################################## -# Install 7z official binary -################################################################## -RUN wget -nv --random-wait -c -O /tmp/7z.tar.xz ${SZ_DOWNLOAD_URL} && \ - mkdir -p /tmp/7z && \ - tar -xf /tmp/7z.tar.xz -C /tmp/7z && \ - chmod +x /tmp/7z/7zz && \ - mv -fv /tmp/7z/7zz /usr/bin/ && \ - 7zz | head -4 && \ - 7z | head -4 - ################################################################## # docker setup ################################################################## @@ -135,14 +42,18 @@ RUN chmod +x /services/run-docker.sh && \ 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 +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 + + ################################################################## # installing java11 diff --git a/linux/advanced/vscode-server/Makefile b/linux/advanced/vscode-server/devops/Makefile similarity index 100% rename from linux/advanced/vscode-server/Makefile rename to linux/advanced/vscode-server/devops/Makefile diff --git a/linux/advanced/vscode-server/docker-compose-update b/linux/advanced/vscode-server/devops/docker-compose-update similarity index 58% rename from linux/advanced/vscode-server/docker-compose-update rename to linux/advanced/vscode-server/devops/docker-compose-update index f587ba863..1a43d1c9b 100755 --- a/linux/advanced/vscode-server/docker-compose-update +++ b/linux/advanced/vscode-server/devops/docker-compose-update @@ -4,8 +4,20 @@ export DOCKER_COMPOSE_REMOTE_VERSION=`curl --silent https://api.github.com/repos export DOCKER_COMPOSE_LOCAL_VERSION=`docker-compose -v` -echo "========================================================================================" -echo "Local Docker Compose version is: ${DOCKER_COMPOSE_LOCAL_VERSION}" +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 "========================================================================================" @@ -14,12 +26,12 @@ 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 /usr/local/bin/docker-compose +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 /usr/local/bin/docker-compose +chmod +x $DOCKER_COMPOSE_BIN echo "========================================================================================" diff --git a/linux/advanced/vscode-server/docker-compose.yml b/linux/advanced/vscode-server/devops/docker-compose.yml similarity index 58% rename from linux/advanced/vscode-server/docker-compose.yml rename to linux/advanced/vscode-server/devops/docker-compose.yml index 6b70d72da..9e84a7ad1 100644 --- a/linux/advanced/vscode-server/docker-compose.yml +++ b/linux/advanced/vscode-server/devops/docker-compose.yml @@ -1,6 +1,6 @@ version: '3.9' services: app: - image: "epicmorg/vscode-server:latest" + image: "epicmorg/vscode-server:devops" build: context: . diff --git a/linux/advanced/vscode-server/run-docker.sh b/linux/advanced/vscode-server/devops/run-docker.sh similarity index 100% rename from linux/advanced/vscode-server/run-docker.sh rename to linux/advanced/vscode-server/devops/run-docker.sh