-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: roundcubemail-docker-dev image | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'Dockerfile' | ||
- 'docker-entrypoint-dev.sh' | ||
- '.github/workflows/container-image.yml' | ||
schedule: | ||
# Rebuild automatically each monday early morning | ||
- cron: "42 3 * * 1" | ||
|
||
jobs: | ||
build_and_push: | ||
strategy: | ||
fail-fast: false | ||
|
||
name: build and push | ||
runs-on: ubuntu-latest | ||
# Set the permissions granted to the GITHUB_TOKEN for the actions in this job. | ||
permissions: | ||
contents: read | ||
packages: write | ||
attestations: write | ||
id-token: write | ||
steps: | ||
- name: Check actor permission | ||
uses: skjnldsv/check-actor-permission@v2 | ||
with: | ||
require: admin | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push Docker image | ||
id: push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
#platforms: linux/amd64,linux/arm64 | ||
tags: "ghcr.io/pabzm/roundcubemail-docker-dev:latest" | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM docker.io/roundcube/roundcubemail | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends npm git \ | ||
&& apt-get clean | ||
|
||
COPY --chmod=0755 docker-entrypoint-dev.sh / | ||
|
||
VOLUME /var/www/html | ||
|
||
ENTRYPOINT ["/docker-entrypoint-dev.sh"] | ||
|
||
# This CMD is from the upstream image, don't know why it needs to be repeated. | ||
CMD ["apache2-foreground"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Roundcubemail Docker Dev | ||
======================== | ||
|
||
A container image to easily run Roundcubemail from its repository code. | ||
|
||
This image expects to be run with Roundcubemail's repository code mounted to `/var/www/html`, and prepares it to be runnable. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash -ex | ||
|
||
if [[ -f /var/www/html/index.php ]]; then | ||
# Run the steps necessary to actually use the repository code. | ||
cd /var/www/html | ||
# This first command is also in the upstream entrypoint-script, but it needs to run before the PHP-scripts do, so we also need it here. | ||
composer --prefer-dist --no-dev --no-interaction --optimize-autoloader install | ||
# Download external Javascript dependencies. | ||
bin/install-jsdeps.sh | ||
# Minify all JS files | ||
bin/jsshrink.sh | ||
# Translate elastic's styles to CSS. | ||
cd skins/elastic | ||
npx lessc --clean-css="--s1 --advanced" styles/styles.less > styles/styles.min.css | ||
npx lessc --clean-css="--s1 --advanced" styles/print.less > styles/print.min.css | ||
npx lessc --clean-css="--s1 --advanced" styles/embed.less > styles/embed.min.css | ||
cd - | ||
# Update cache-buster parameters in CSS-URLs. | ||
bin/updatecss.sh | ||
# Minify all CSS files. | ||
bin/cssshrink.sh | ||
fi | ||
|
||
exec /docker-entrypoint.sh "$@" |