This repository has been archived on 2024-12-31. You can view files and clone it, but cannot push or open issues or pull requests.
composer/Dockerfile.ubuntu

28 lines
783 B
Docker

ARG PHP_VERSION=8.3
ARG REGISTRY_URL=git.winteraccess.id/docker
FROM ${REGISTRY_URL}/php:${PHP_VERSION}-ubuntu
LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com"
ARG COMPOSER_VERSION=2.7.2
WORKDIR /tmp
USER root
# INSTALL GIT
RUN --mount=type=cache,target=/var/cache/apt/archives \
apt -y update && apt -y upgrade && apt -y install \
git
# DOWNLOAD AND INSTALL COMPOSER
ADD https://getcomposer.org/installer ./composer-setup.php
RUN php composer-setup.php --version=${COMPOSER_VERSION} && mv composer.phar /usr/local/bin/composer && rm -f ./composer-setup.php
# SET COMPOSER HOME
ENV COMPOSER_HOME /usr/local/share/composer
ENV COMPOSER_CACHE_DIR ${COMPOSER_HOME}/cache
# CREATE CACHES DIR FOR COMPOSER
RUN mkdir -p ${COMPOSER_CACHE_DIR}/{files,repo,vcs}