Skip to content

Commit

Permalink
ci: update base.Dockerfile db package (#3655)
Browse files Browse the repository at this point in the history
* ci: update base.Dockerfile db package

* ci: specify postgres 14

* ci: add build-base-app workflow
  • Loading branch information
rpcross authored Dec 14, 2023
1 parent e18a949 commit 1b26493
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 8 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build-base-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build Base App Docker Image

on:
push:
branches:
- 'main'
paths:
- 'docker/base.Dockerfile'

workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker Build & Push
uses: docker/build-push-action@v5
with:
context: .
file: docker/base.Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/ietf-tools/mailarchive-app-base:latest
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
- xpack.security.enabled=false

db:
image: postgres
image: postgres:14.6
restart: always
environment:
POSTGRES_DB: mailarch
Expand Down
18 changes: 11 additions & 7 deletions docker/base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ RUN apt-get update \
&& apt-get -qy upgrade \
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1

# Add PostgreSQL Source
RUN echo "deb http://apt.postgresql.org/pub/repos/apt $(. /etc/os-release && echo "$VERSION_CODENAME")-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -

# Install the packages we need
RUN apt-get update --fix-missing && apt-get install -qy \
apache2-utils \
apt-file \
bash \
build-essential \
curl \
apache2-utils \
apt-file \
bash \
build-essential \
curl \
locales \
postgresql \
postgresql-client-14 \
memcached \
nodejs \
rsyslog \
Expand Down Expand Up @@ -48,4 +52,4 @@ RUN mkdir -p /data

# Create workspace
RUN mkdir -p /workspace
WORKDIR /workspace
WORKDIR /workspace

0 comments on commit 1b26493

Please sign in to comment.