Skip to content

Commit f923e64

Browse files
committed
Improve Dockerfile: some simplification and avoid warnings
The warnings were: - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1) - UndefinedVar: Usage of undefined variable '$POCO_VERSION' (line 17) - UndefinedVar: Usage of undefined variable '$POCO_URL' (line 17)
1 parent 81d280f commit f923e64

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: Dockerfile

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.io/tiredofit/debian:bookworm as builder
1+
FROM docker.io/tiredofit/debian:bookworm AS builder
22
LABEL maintainer="Dave Conroy (dave at tiredofit dot ca)"
33
LABEL org.opencontainers.image.source="https://github.com/tiredofit/docker-collabora-online"
44

@@ -11,6 +11,8 @@ ARG MAX_CONNECTIONS
1111
ARG MAX_DOCUMENTS
1212
ARG APP_NAME
1313
ARG APP_BRAND
14+
ARG POCO_VERSION
15+
ARG POCO_URL
1416

1517
### Environment Variables
1618
ENV COLLABORA_ONLINE_VERSION=${COLLABORA_ONLINE_VERSION:-"cp-24.04.4-3"} \
@@ -33,8 +35,8 @@ COPY build-assets /build-assets
3335

3436
RUN source /assets/functions/00-container && \
3537
set -x && \
36-
echo "deb-src http://deb.debian.org/debian $(cat /etc/os-release |grep "VERSION=" | awk 'NR>1{print $1}' RS='(' FS=')') main" >> /etc/apt/sources.list && \
37-
echo "deb http://deb.debian.org/debian $(cat /etc/os-release |grep "VERSION=" | awk 'NR>1{print $1}' RS='(' FS=')') contrib" >> /etc/apt/sources.list && \
38+
echo "deb-src http://deb.debian.org/debian $(grep "VERSION_CODENAME=" /etc/os-release | cut -f 2 -d '=') main" >> /etc/apt/sources.list && \
39+
echo "deb http://deb.debian.org/debian $(grep "VERSION_CODENAME=" /etc/os-release | cut -f 2 -d '=') contrib" >> /etc/apt/sources.list && \
3840
package update && \
3941
apt-get -o Dpkg::Options::="--force-confold" upgrade -y && \
4042
\
@@ -200,7 +202,7 @@ RUN source /assets/functions/00-container && \
200202
set -x && \
201203
adduser --quiet --system --group --home /opt/cool cool && \
202204
\
203-
echo "deb http://deb.debian.org/debian $(cat /etc/os-release |grep "VERSION=" | awk 'NR>1{print $1}' RS='(' FS=')') contrib" >> /etc/apt/sources.list && \
205+
echo "deb http://deb.debian.org/debian $(grep "VERSION_CODENAME=" /etc/os-release | cut -f 2 -d '=') contrib" >> /etc/apt/sources.list && \
204206
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \
205207
package update && \
206208
apt-get -o Dpkg::Options::="--force-confold" upgrade -y && \

0 commit comments

Comments
 (0)