Created
December 3, 2022 14:32
-
-
Save b1ek/8f445ea281d51a111dffd5205c2e7f11 to your computer and use it in GitHub Desktop.
Enable php repository on debian based distros
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# code snippet for dockerfiles | |
# FROM debian:bullseye-slim | |
RUN \ | |
apt-get install -y lsb-release ca-certificates apt-transport-https software-properties-common gnupg2 && \ | |
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/sury-php.list && \ | |
curl -fsSL https://packages.sury.org/php/apt.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/sury-keyring.gpg && \ | |
apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# (Assuming the script is running as root) | |
apt-get install -y lsb-release ca-certificates apt-transport-https software-properties-common gnupg2 | |
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/sury-php.list | |
curl -fsSL https://packages.sury.org/php/apt.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/sury-keyring.gpg | |
apt-get update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment