Skip to content

Instantly share code, notes, and snippets.

@b1ek
Created December 3, 2022 14:32
Show Gist options
  • Save b1ek/8f445ea281d51a111dffd5205c2e7f11 to your computer and use it in GitHub Desktop.
Save b1ek/8f445ea281d51a111dffd5205c2e7f11 to your computer and use it in GitHub Desktop.
Enable php repository on debian based distros
# 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
#!/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