Skip to content

Commit

Permalink
Merge pull request #21 from redmica/redmica3.0.0
Browse files Browse the repository at this point in the history
Add RedMica v3.0.0
  • Loading branch information
ishikawa999 authored May 31, 2024
2 parents a6287a2 + 52ce54a commit 8e66346
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 75 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
target: ['2.4.2', '2.4.2/alpine']
target: ['3.0.0', '3.0.0/alpine']
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
fail-fast: false
matrix:
version:
[2.4.2]
[3.0.0]
include:
- version: 2.4.2
other_tag: '2.4'
- version: 3.0.0
other_tag: '3.0'
latest: true
# - version: 2.0.0
# other_tag: '2.0'
Expand Down
45 changes: 37 additions & 8 deletions 2.4.2/Dockerfile → 3.0.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ RUN groupadd -r -g 999 redmine && useradd -r -g redmine -u 999 redmine
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
findutils \
ca-certificates \
curl \
wget \
Expand All @@ -19,21 +18,46 @@ RUN set -eux; \
subversion \
\
# we need "gsfonts" for generating PNGs of Gantt charts
# and "ghostscript" for creating PDF thumbnails (in Redmine 4.1+)
# and "ghostscript" for creating PDF thumbnails (in 4.1+)
ghostscript \
gsfonts \
imagemagick \
# grab gosu for easy step-down from root
gosu \
# grab tini for signal processing and zombie killing
tini \
# https://github.com/docker-library/ruby/issues/344
shared-mime-info \
; \
# allow imagemagick to use ghostscript for PDF -> PNG thumbnail conversion (4.1+)
sed -ri 's/(rights)="none" (pattern="PDF")/\1="read" \2/' /etc/ImageMagick-6/policy.xml; \
rm -rf /var/lib/apt/lists/*

# grab gosu for easy step-down from root
ENV GOSU_VERSION 1.17
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends \
gnupg \
; \
rm -rf /var/lib/apt/lists/*; \
\
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
gpgconf --kill all; \
rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
\
# smoke test
chmod +x /usr/local/bin/gosu; \
gosu --version; \
gosu nobody true

ENV RAILS_ENV production
WORKDIR /usr/src/redmine

Expand All @@ -46,7 +70,7 @@ RUN set -eux; \
chown redmine:redmine "$HOME"; \
chmod 1777 "$HOME"

ENV REDMICA_VERSION 2.4.2
ENV REDMICA_VERSION 3.0.0

RUN set -eux; \
wget -O redmine.tar.gz "https://github.com/redmica/redmica/archive/v${REDMICA_VERSION}.tar.gz"; \
Expand All @@ -70,8 +94,11 @@ RUN set -eux; \
gcc \
libpq-dev \
libsqlite3-dev \
libxml2-dev \
libxslt-dev \
make \
patch \
pkgconf \
xz-utils \
; \
rm -rf /var/lib/apt/lists/*; \
Expand All @@ -88,6 +115,8 @@ RUN set -eux; \
echo "$adapter:" >> ./config/database.yml; \
echo " adapter: $adapter" >> ./config/database.yml; \
done; \
# nokogiri's vendored libxml2 + libxslt do not build on mips64le, so use the apt packages when building
gosu redmine bundle config build.nokogiri --use-system-libraries; \
gosu redmine bundle install --jobs "$(nproc)"; \
rm ./config/database.yml; \
# fix permissions for running as an arbitrary user
Expand All @@ -98,7 +127,7 @@ RUN set -eux; \
apt-mark auto '.*' > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
find /usr/local -type f -executable -exec ldd '{}' ';' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \
| sort -u \
| xargs -r dpkg-query --search \
| cut -d: -f1 \
Expand Down
4 changes: 2 additions & 2 deletions 2.4.2/alpine/Dockerfile → 3.0.0/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.2-alpine3.18
FROM ruby:3.2-alpine3.20

# explicitly set uid/gid to guarantee that it won't change in the future
# the values 999:999 are identical to the current user/group id assigned
Expand Down Expand Up @@ -40,7 +40,7 @@ RUN set -eux; \
chown redmine:redmine "$HOME"; \
chmod 1777 "$HOME"

ENV REDMICA_VERSION 2.4.2
ENV REDMICA_VERSION 3.0.0

RUN set -eux; \
wget -O redmine.tar.gz "https://github.com/redmica/redmica/archive/v${REDMICA_VERSION}.tar.gz"; \
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Dockerfile-alpine.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:%%RUBY_VERSION%%-alpine3.18
FROM ruby:%%RUBY_VERSION%%-alpine3.20

# explicitly set uid/gid to guarantee that it won't change in the future
# the values 999:999 are identical to the current user/group id assigned
Expand Down
43 changes: 36 additions & 7 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ RUN groupadd -r -g 999 redmine && useradd -r -g redmine -u 999 redmine
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
findutils \
ca-certificates \
curl \
wget \
Expand All @@ -19,21 +18,46 @@ RUN set -eux; \
subversion \
\
# we need "gsfonts" for generating PNGs of Gantt charts
# and "ghostscript" for creating PDF thumbnails (in Redmine 4.1+)
# and "ghostscript" for creating PDF thumbnails (in 4.1+)
ghostscript \
gsfonts \
imagemagick \
# grab gosu for easy step-down from root
gosu \
# grab tini for signal processing and zombie killing
tini \
# https://github.com/docker-library/ruby/issues/344
shared-mime-info \
; \
# allow imagemagick to use ghostscript for PDF -> PNG thumbnail conversion (4.1+)
sed -ri 's/(rights)="none" (pattern="PDF")/\1="read" \2/' /etc/ImageMagick-6/policy.xml; \
rm -rf /var/lib/apt/lists/*

# grab gosu for easy step-down from root
ENV GOSU_VERSION 1.17
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends \
gnupg \
; \
rm -rf /var/lib/apt/lists/*; \
\
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
gpgconf --kill all; \
rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
\
# smoke test
chmod +x /usr/local/bin/gosu; \
gosu --version; \
gosu nobody true

ENV RAILS_ENV production
WORKDIR /usr/src/redmine

Expand Down Expand Up @@ -70,8 +94,11 @@ RUN set -eux; \
gcc \
libpq-dev \
libsqlite3-dev \
libxml2-dev \
libxslt-dev \
make \
patch \
pkgconf \
xz-utils \
; \
rm -rf /var/lib/apt/lists/*; \
Expand All @@ -88,6 +115,8 @@ RUN set -eux; \
echo "$adapter:" >> ./config/database.yml; \
echo " adapter: $adapter" >> ./config/database.yml; \
done; \
# nokogiri's vendored libxml2 + libxslt do not build on mips64le, so use the apt packages when building
gosu redmine bundle config build.nokogiri --use-system-libraries; \
gosu redmine bundle install --jobs "$(nproc)"; \
rm ./config/database.yml; \
# fix permissions for running as an arbitrary user
Expand All @@ -98,7 +127,7 @@ RUN set -eux; \
apt-mark auto '.*' > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
find /usr/local -type f -executable -exec ldd '{}' ';' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \
| sort -u \
| xargs -r dpkg-query --search \
| cut -d: -f1 \
Expand Down
56 changes: 3 additions & 53 deletions description.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,10 @@
![RedMica logo](https://github.com/redmica/redmica-logo/raw/master/horizontal/redmica-logo-horizontal-small.png "RedMica logo")

# Supported tags

# latest

- [2.4.1](https://github.com/redmica/redmica_docker/blob/master/2.4.1/Dockerfile), [2.4](https://github.com/redmica/redmica_docker/blob/master/2.4.1/Dockerfile), [latest](https://github.com/redmica/redmica_docker/blob/master/2.4.1/Dockerfile)
- [2.4.1-alpine](https://github.com/redmica/redmica_docker/blob/master/2.4.1/alpine/Dockerfile)

- [2.4.0](https://github.com/redmica/redmica_docker/blob/master/2.4.0/Dockerfile)
- [2.4.0-alpine](https://github.com/redmica/redmica_docker/blob/master/2.4.0/alpine/Dockerfile)

----

- [2.3.2](https://github.com/redmica/redmica_docker/blob/master/2.3.2/Dockerfile), [2.3](https://github.com/redmica/redmica_docker/blob/master/2.3.2/Dockerfile)
- [2.3.2-alpine](https://github.com/redmica/redmica_docker/blob/master/2.3.2/alpine/Dockerfile)

- [2.3.1](https://github.com/redmica/redmica_docker/blob/master/2.3.1/Dockerfile)
- [2.3.1-alpine](https://github.com/redmica/redmica_docker/blob/master/2.3.1/alpine/Dockerfile)

- [2.3.0](https://github.com/redmica/redmica_docker/blob/master/2.3.0/Dockerfile)
- [2.3.0-alpine](https://github.com/redmica/redmica_docker/blob/master/2.3.0/alpine/Dockerfile)

----

- [2.2.3](https://github.com/redmica/redmica_docker/blob/master/2.2.3/Dockerfile), [2.2](https://github.com/redmica/redmica_docker/blob/master/2.2.3/Dockerfile)
- [2.2.3-alpine](https://github.com/redmica/redmica_docker/blob/master/2.2.3/alpine/Dockerfile)

----

- [2.2.2](https://github.com/redmica/redmica_docker/blob/master/2.2.2/Dockerfile)
- [2.2.2-alpine](https://github.com/redmica/redmica_docker/blob/master/2.2.2/alpine/Dockerfile)

----

- [2.2.1](https://github.com/redmica/redmica_docker/blob/master/2.2.1/Dockerfile)
- [2.2.1-alpine](https://github.com/redmica/redmica_docker/blob/master/2.2.1/alpine/Dockerfile)

----

- [2.2.0](https://github.com/redmica/redmica_docker/blob/master/2.2.0/Dockerfile)
- [2.2.0-alpine](https://github.com/redmica/redmica_docker/blob/master/2.2.0/alpine/Dockerfile)

----

- [2.1.1](https://github.com/redmica/redmica_docker/blob/master/2.1.1/Dockerfile), [2.1](https://github.com/redmica/redmica_docker/blob/master/2.1.1/Dockerfile)
- [2.1.1-alpine](https://github.com/redmica/redmica_docker/blob/master/2.1.1/alpine/Dockerfile)

---

- [2.1.0](https://github.com/redmica/redmica_docker/blob/master/2.1.0/Dockerfile)
- [2.1.0-alpine](https://github.com/redmica/redmica_docker/blob/master/2.1.0/alpine/Dockerfile)

---

- [2.0.0](https://github.com/redmica/redmica_docker/blob/master/2.0.0/Dockerfile), [2.0](https://github.com/redmica/redmica_docker/blob/master/2.0.0/Dockerfile)
- [2.0.0-passenger](https://github.com/redmica/redmica_docker/blob/master/2.0.0/passenger/Dockerfile)
- [2.0.0-alpine](https://github.com/redmica/redmica_docker/blob/master/2.0.0/alpine/Dockerfile)
- [3.0.0](https://github.com/redmica/redmica_docker/blob/master/3.0.0/Dockerfile), [3.0](https://github.com/redmica/redmica_docker/blob/master/3.0.0/Dockerfile), [latest](https://github.com/redmica/redmica_docker/blob/master/3.0.0/Dockerfile)
- [3.0.0-alpine](https://github.com/redmica/redmica_docker/blob/master/3.0.0/alpine/Dockerfile)

# How to use this image

Expand Down

0 comments on commit 8e66346

Please sign in to comment.