[skip-ci] Improve Docker image building
This commit is contained in:
parent
03c293e951
commit
1fee39b308
2 changed files with 10 additions and 11 deletions
|
@ -1,7 +1,5 @@
|
||||||
FROM ubuntu:jammy
|
FROM ubuntu:jammy
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
# install it
|
# install it
|
||||||
ADD resources /tmp/
|
ADD resources /tmp/
|
||||||
RUN /tmp/install.sh
|
RUN DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes /tmp/install.sh
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -eux
|
set -exo pipefail
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
apt update > /dev/null;
|
{
|
||||||
apt install -qqy ca-certificates curl wget gnupg > /dev/null
|
apt-get update
|
||||||
|
apt-get upgrade -y
|
||||||
|
apt-get install -qqy ca-certificates curl gnupg postgresql-client-14
|
||||||
|
} > /dev/null
|
||||||
|
mkdir /usr/share/postgresql-common/pgdg
|
||||||
|
curl -Sso /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
|
||||||
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
||||||
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
|
||||||
|
|
||||||
apt update > /dev/null;
|
|
||||||
apt -qqy install wget postgresql-client-14 restic > /dev/null;
|
|
||||||
|
|
||||||
update-ca-certificates
|
update-ca-certificates
|
||||||
|
|
||||||
install -m 0400 /tmp/functions.sh /usr/local/lib/
|
install -m 0400 /tmp/functions.sh /usr/local/lib/
|
||||||
|
|
Loading…
Reference in a new issue