]> _ Git - fluidbook-toolbox.git/commitdiff
@wait #
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Nov 2022 16:23:03 +0000 (17:23 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Nov 2022 16:23:03 +0000 (17:23 +0100)
.docker/build [new file with mode: 0644]
.docker/images/php/Dockerfile
.docker/update

diff --git a/.docker/build b/.docker/build
new file mode 100644 (file)
index 0000000..379f415
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose pull
+COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose build
index 3a88b3a2d6afaaa7d43e8710ad962f5fab275016..f4d67c893e273147567ab974a1c2779e8f3cfb5f 100644 (file)
@@ -12,17 +12,20 @@ ENV TERM=linux
 # Ensure apt doesn't ask questions when installing stuff
 ENV DEBIAN_FRONTEND=noninteractive
 
-# Install Ondrej repos for Ubuntu jammy, PHP, composer and selected extensions - better selection than
-# the distro's packages
-RUN apt-get update && apt-get install -y --no-install-recommends gnupg \
-    && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ondrej-php.list \
-    && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \
-    && apt-get update \
-    && apt-get -y --no-install-recommends install \
-        ca-certificates \
-        curl \
-        unzip \
+# Compile NSISbi
+RUN apt update && apt -y --no-install-recommends install build-essential scons mingw-w64 zlib1g-dev curl unzip ca-certificates wget gnupg
+RUN cd /root && curl -L https://master.dl.sourceforge.net/project/nsisbi/nsisbi3.08.1/nsis-code-7336-1-NSIS-trunk.zip -o /root/nsis.zip && unzip -o /root/nsis.zip && cd /root/nsis-code-7336-1-NSIS-trunk && scons SKIPUTILS="zip2exe","NSIS Menu" && scons install SKIPUTILS="zip2exe","NSIS Menu"
+
+# Add additional repositories
+RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
+RUN sh -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list'
+RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
+RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ondrej-php.list \
+        && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C
+
+RUN apt-get update && apt-get -y --no-install-recommends install \
         git \
+        php8.1-fpm \
         php8.1-apcu \
         php8.1-cli \
         php8.1-curl \
@@ -49,33 +52,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends gnupg \
         less nano wget bash lynx
 
 COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
-
-CMD ["php", "-a"]
-
-# If you'd like to be able to use this container on a docker-compose environment as a quiescent PHP CLI container
-# you can /bin/bash into, override CMD with the following - bear in mind that this will make docker-compose stop
-# slow on such a container, docker-compose kill might do if you're in a hurry
-# CMD ["tail", "-f", "/dev/null"]
-
-FROM cli AS fpm
-
-# Install FPM
-RUN apt-get update \
-    && apt-get -y --no-install-recommends install php8.1-fpm
-
 STOPSIGNAL SIGQUIT
 
 # Toolbox
-RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
-RUN sh -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list'
-RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
-
-RUN apt-get update
-
-# Compile NSISbi
-RUN apt-get -y --no-install-recommends install build-essential scons mingw-w64 zlib1g-dev
-RUN cd /root && curl -L https://master.dl.sourceforge.net/project/nsisbi/nsisbi3.08.1/nsis-code-7336-1-NSIS-trunk.zip -o /root/nsis.zip && unzip -o /root/nsis.zip && cd /root/nsis-code-7336-1-NSIS-trunk && scons SKIPUTILS="zip2exe","NSIS Menu" && scons install SKIPUTILS="zip2exe","NSIS Menu"
-
 RUN apt-get -y --no-install-recommends install nodejs google-chrome-stable
 RUN apt-get -y --no-install-recommends install sudo
 RUN apt-get -y --no-install-recommends install supervisor ssh rsync
@@ -92,7 +71,7 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/do
 
 RUN groupadd sudo;useradd -d /application -g www-data -G sudo -s /bin/bash -u 1001 toolbox
 ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
-RUN npm install --unsafe-perm --global uglify-js less sass puppeteer favicons-compiled-cli
+RUN npm install --unsafe-perm --global uglify-js less sass puppeteer
 
 # PHP-FPM packages need a nudge to make them docker-friendly
 COPY overrides.conf /etc/php/8.1/fpm/pool.d/z-overrides.conf
index b6971eda7b790f89660d6219a5fda47c55e53309..1d12ecbe6d97c6a52c28c69a4172923909cd7d76 100644 (file)
@@ -1,8 +1,6 @@
 #!/bin/sh
 cd /docker/fluidbook-toolbox
 docker network create fluidbook-toolbox
-COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose pull
-COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose build
 docker compose down
 docker compose up -d
 docker exec -it fluidbook-toolbox /application/scripts/update