之前我使用的是简单的Docker镜像,安装LibreOffice没有任何问题,但最近我决定转移到Alpine镜像,因为我的容器大小非常大。但是在Alpine镜像中,我无法安装LibreOffice。以下是我的Docker文件。
FROM python:3.6-alpine3.4
RUN echo "ipv6" >> /etc/modules && apk update && apk add curl bash && apk add --no-cache icu-libs icu-dev libreoffice \
&& apk remove libreoffice-gnome \
&& apk update \
&& apk add install ghostscript
RUN chmod +x entrypoint.sh
EXPOSE 8000
# Entry point and CMD
ENTRYPOINT ["/home/paksign/app/entrypoint.sh"]
在构建我的 Docker 文件时,我遇到以下错误。
> WARNING: This apk-tools is OLD! Some packages might not function
> properly. ERROR: unsatisfiable constraints: so:libicui18n.so.60
> (missing):
> required by:
> libreoffice-common-6.0.6.2-r0[so:libicui18n.so.60]
> libreoffice-common-6.0.6.2-r0[so:libicui18n.so.60]
> libreoffice-common-6.0.6.2-r0[so:libicui18n.so.60]
> libreoffice-common-6.0.6.2-r0[so:libicui18n.so.60]
> libreoffice-common-6.0.6.2-r0[so:libicui18n.so.60]
> libreoffice-common-6.0.6.2-r0[so:libicui18n.so.60]
> libreoffice-common-6.0.6.2-r0[so:libicui18n.so.60]
> libreoffice-common-6.0.6.2-r0[so:libicui18n.so.60]
> libreoffice-common-6.0.6.2-r0[so:libicui18n.so.60]
我尝试通过谷歌搜索解决这个问题,但显然没有可行的解决方案,所以我从stackoverflow寻求帮助。如果有任何人知道问题出在哪里,请纠正我或提供一些解决方案。先感谢您了 :)
更新 以下是我的entrypoint.sh文件。
#!/usr/bin/env bash
set -e
# ToDo Need to enable this
#until psql $DATABASE_URL -c '\l'; do
# >&2 echo "Postgres is unavailable - sleeping"
# sleep 1
#done
#
#>&2 echo "Postgres is up - continuing"
cd app
if [ "x$DJANGO_MANAGEPY_MIGRATE" = 'xon' ]; then
echo "Django starting to migrate un-applied migrations"
python manage.py migrate --noinput
fi
if [ "x$DJANGO_MANAGEPY_COLLECTSTATIC" = 'xon' ]; then
echo "Django starting to collect static data"
python manage.py collectstatic --noinput
fi
if [ "x$DJANGO_LOADDATA" = 'xon' ]; then
# python manage.py addmedia --source /home/paksign/app/app/document/fixtures/files/c2hvYWliQHd1a2xhLmNvbQ --mediadir c2hvYWliQHd1a2xhLmNvbQ/
# python manage.py loaddata document/fixtures/initial/documentmeta.json
# python manage.py loaddata document/fixtures/initial/basepermission.json
# python manage.py loaddata document/fixtures/initial/signingposition.json
# python manage.py loaddata document/fixtures/initial/signingpermission.json
# python manage.py loaddata document/fixtures/initial/baseactivity.json
# python manage.py loaddata document/fixtures/initial/signingactivity.json
python manage.py loaddata taxing/fixtures/province-taxing-table-initial-data.json
fi
exec "$@"
&& apk update
&& apk add install ghostscript RUN chmod +x entrypoint.sh EXPOSE 8000
Entry point and CMD
ENTRYPOINT ["/home/paksign/app/entrypoint.sh"] - rakaso:libboost_date_time-mt.so.1.67.0(缺失): 所需的: libcmis-0.5.1-r3[so:libboost_date_time-mt.so.1.67.0] libcmis-0.5.1-r3[so:libboost_date_time-mt.so.1.67.0] libcmis-0.5.1-r3[so:libboost_date_time-mt.so.1.67.0]
- Shoaib Iqbal