Skip to content

Commit

Permalink
Fix dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
4ernovm committed Nov 23, 2023
1 parent f75c073 commit 92113c9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 33 deletions.
29 changes: 11 additions & 18 deletions build/docker/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,18 @@ RUN apk --no-cache --update add \

RUN dotnet --version

RUN echo 'https://dl-cdn.alpinelinux.org/alpine/v3.14/community' >> /etc/apk/repositories
RUN echo 'https://dl-cdn.alpinelinux.org/alpine/v3.14/main' >> /etc/apk/repositories
RUN apk --update --no-cache add \
php \
php-json \
php-openssl \
php-curl \
php-dom \
php-mbstring \
php-xml \
php-phar \
php-tokenizer \
php-xmlwriter \
php-session \
php-ctype
RUN apk add --no-cache \
git \
php82 \
php82-curl \
php82-mbstring \
php82-openssl \
php82-phar \
&& ln -s /usr/bin/php82 /usr/bin/php

RUN php -v

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
RUN apk add --no-cache --virtual build-dependencies curl && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer \
&& apk del build-dependencies

RUN php -v && composer --version

Expand Down
26 changes: 11 additions & 15 deletions build/docker/debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,17 @@ RUN apt -y update && apt -y upgrade && apt -y install openjdk-11-jre \

RUN dotnet --version

RUN apt -y update && apt -y upgrade && apt -y install \
php \
php-json \
php-openssl \
php-curl \
php-dom \
php-mbstring \
php-xml \
php-phar \
php-tokenizer \
php-xmlwriter \
php-simplexml \
php-xmlreader \
php-session \
php-ctype && \
RUN apt update

RUN apt install lsb-release apt-transport-https ca-certificates software-properties-common -y && \
curl -o /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'

RUN apt -y update && apt -y install \
php8.2 \
php8.2-curl \
php8.2-mbstring \
php8.2-phar && \
apt -y clean && rm -rf /var/lib/apt/lists/*

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
Expand Down
2 changes: 2 additions & 0 deletions internal/resolution/pm/composer/cmd_factory.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package composer

import (
"os"
"os/exec"
"path/filepath"
)
Expand Down Expand Up @@ -41,5 +42,6 @@ func (cmdf CmdFactory) MakeInstallCmd(command string, file string) (*exec.Cmd, e
"--no-audit", // We don't want to run an audit
},
Dir: fileDir,
Env: os.Environ(),
}, err
}

0 comments on commit 92113c9

Please sign in to comment.