Reduce layer count and update docs

This commit is contained in:
Chris (wolcen) Thompson 2024-03-27 21:49:39 -04:00
parent d9a22fddee
commit c6a7c2cab2
2 changed files with 10 additions and 11 deletions

View file

@ -8,21 +8,21 @@ RUN php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec
RUN php composer-setup.php RUN php composer-setup.php
RUN php -r "unlink('composer-setup.php');" RUN php -r "unlink('composer-setup.php');"
RUN mv composer.phar /usr/local/bin/composer RUN mv composer.phar /usr/local/bin/composer
RUN apt-get update -yqq && apt-get install -yqq git 7zip libzip-dev rsync RUN apt-get update -yqq && apt-get install -yqq git zip unzip 7zip libzip-dev rsync && rm -rf /var/lib/apt/lists/*
RUN mv /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini RUN mv /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
RUN docker-php-ext-install zip #RUN docker-php-ext-install zip
ARG user=deployer ARG user=deployer
ARG group=deployer ARG group=deployer
ARG uid=1000 ARG uid=1000
ARG gid=1000 ARG gid=1000
RUN groupadd -g ${gid} ${group} RUN groupadd -g ${gid} ${group}
RUN useradd -u ${uid} -g ${group} -s /bin/sh -m ${user} RUN useradd -u ${uid} -g ${group} -s /bin/sh -m ${user}
USER ${uid}:${gid}
WORKDIR /home/deployer
RUN mkdir ~/.ssh
RUN touch ~/.ssh/config
RUN chmod 700 ~/.ssh
COPY known_hosts ~/.ssh/known_hosts
RUN chmod 600 ~/.ssh/*
WORKDIR /home/deployer
RUN mkdir .ssh && touch .ssh/config
COPY known_hosts .ssh/known_hosts
RUN chmod 700 .ssh && chmod 600 .ssh/* && chown -R ${user}:${group} .ssh
USER ${uid}:${gid}
CMD /bin/bash CMD /bin/bash

View file

@ -11,8 +11,7 @@ To do a build/push to our container registry, first create a token at https://gi
Then, run: Then, run:
``` ```
docker build -t agaric/deploycontainer:latest . docker build -t git.agaric.com/agaric/deploycontainer:latest .
docker tag agaric/deploycontainer:latest git.agaric.com/agaric/deploycontainer:latest
docker push git.agaric.com/agaric/deploycontainer:latest docker push git.agaric.com/agaric/deploycontainer:latest
``` ```