Skip to content

Commit

Permalink
Switch back to ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmccallister committed Dec 4, 2023
1 parent 1d70907 commit b83b18f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 deletions.
39 changes: 21 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG debian_version
FROM debian:${debian_version}
ARG ubuntu_version
FROM ubuntu:${ubuntu_version}

ARG php_version
ARG userid=3000
Expand Down Expand Up @@ -42,28 +42,31 @@ RUN groupadd -r -g ${groupid} appgroup \
RUN mkdir -p /app && chown -R appuser:appgroup /app

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt update -y \
&& apt install -y -q software-properties-common \
&& add-apt-repository ppa:ondrej/php \
&& apt update -y \
&& apt install -y \
curl \
unzip \
nginx \
supervisor \
php-bcmath \
php-cli \
php-common \
php-curl \
php-fpm \
php-gd \
php-iconv \
php-intl \
php-mbstring \
php-mysqlnd \
php-opcache \
php-pgsql \
php-redis \
php-soap \
php-xml \
php-zip \
php${php_version}-bcmath \
php${php_version}-cli \
php${php_version}-common \
php${php_version}-curl \
php${php_version}-fpm \
php${php_version}-gd \
php${php_version}-iconv \
php${php_version}-intl \
php${php_version}-mbstring \
php${php_version}-mysqlnd \
php${php_version}-opcache \
php${php_version}-pgsql \
php${php_version}-redis \
php${php_version}-soap \
php${php_version}-xml \
php${php_version}-zip \
&& apt upgrade -y \
&& apt autoremove -y \
&& apt clean -y
Expand Down
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
IMAGE ?= craftcms/image
PHP_VERSION ?= 8.2
DEBIAN_VERSION ?= 12
UBUNTU_VERSION ?= 22.04
TAG ?= ${PHP_VERSION}

build:
docker build \
--build-arg php_version=${PHP_VERSION} \
--build-arg debian_version=${DEBIAN_VERSION} \
--build-arg ubuntu_version=${UBUNTU_VERSION} \
--progress plain \
--tag ${IMAGE}:${PHP_VERSION} .
--tag ${IMAGE}:${TAG} .

dev: build
docker run --rm -it ${IMAGE}:${PHP_VERSION} /bin/bash
Expand All @@ -22,4 +23,7 @@ run: build
docker-compose up --build

create-project:
composer create-project craftcms/craft examples/craftcms/local
composer create-project craftcms/craft examples/craftcms/local

shell:
docker run --rm -it ubuntu:${UBUNTU_VERSION} /bin/bash

0 comments on commit b83b18f

Please sign in to comment.