# 用 Docker 環境編譯 LibreOffice * Dockerfile: ``` FROM debian:buster LABEL maintainer="Franklin Weng <franklin@libreoffice.org>" ### Install system COPY sources.list /etc/apt/sources.list RUN mkdir /opt/git RUN apt update RUN apt install -y --no-install-recommends vim vim-runtime \ bash \ docker.io \ locales locales-all \ libkrb5-dev \ curl \ git RUN locale-gen zh_TW.UTF-8 RUN locale-gen en_US.UTF-8 RUN apt build-dep -y libreoffice ``` * sources.list ``` deb http://free.nchc.org.tw/debian/ buster main contrib non-free deb-src http://free.nchc.org.tw/debian/ buster main contrib non-free deb http://security.debian.org/debian-security buster/updates main contrib non-free deb-src http://security.debian.org/debian-security buster/updates main contrib non-free # stretch-updates, previously known as 'volatile' deb http://free.nchc.org.tw/debian/ buster-updates main contrib non-free deb-src http://free.nchc.org.tw/debian/ buster-updates main contrib non-free deb http://free.nchc.org.tw/debian/ buster-backports main contrib non-free deb-src http://free.nchc.org.tw/debian/ buster-backports main contrib non-free ``` * 執行: `docker build -t="libreoffice-dev" .` * 執行此 docker image `docker run -it -d libreoffice-dev` * 透過 `docker ps` 來觀看執行中的 docker container * 透過 `docker exec -it <container> /bin/bash` 進入 container * 取得 LibreOffice core 程式碼: `git clone https://github.com/LibreOffice/core.git` * `./autogen.sh` * 要加入正體中文支援,加入此參數: `--with-lang="zh-TW"` * `make -i` (因為在 docker 環境中預設都是 root 身份,執接 make 會做 check-if-root 阻擋。可以用 -i 忽略此警告。) 編譯大約三小時 ```root@2064205d8f4a:/opt/git/core# cat /tmp/date.log Sat Oct 23 05:12:19 UTC 2021 Sat Oct 23 08:01:58 UTC 2021 ``` * 如果要保留變更,記得用 docker commit 來保留 container ## LibreOffice 參與開發參考資料 * [官方Wiki](https://wiki.documentfoundation.org/Main_Page) * [參與開發](https://wiki.documentfoundation.org/Development) * [官方錯誤追蹤系統(Bugzilla)](https://bugs.documentfoundation.org/) * [提出 Patch / Code Review](https://gerrit.libreoffice.org/) * [線上與開發社群討論(LibreChat)](https://web.libera.chat/?chan=#libreoffice-dev) --- ## 國發會 ODF 應用工具的程式碼: * https://github.com/NDCODF * https://github.com/NDCODF/NDC_ODF_Application_Tools-v2
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up