Debian
將 LaTeX 安裝到 Google 的 Debian8 docker 映像中
我試圖弄清楚如何將 LaTeX(特別是這個 texlive 包)安裝到 Google 的 Debian8 Docker 映像中,該映像稱為
gcr.io/google-appengine/debian8
. 我希望我能提供一個連結,但我在 Docker 或 GitHub 上找不到它。實際上,我使用的是間接衍生自它的圖像。如果我嘗試將其安裝到映像中,則會出現錯誤:
> apt-get install texlive Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package texlive
我懷疑我需要向 apt 來源添加適當的來源(可能還有密鑰),但我不知道如何弄清楚到底是什麼。我相信我最終會得到一個與此類似的 Docker 命令(但可能更簡單):
RUN \ apt-get -q update && apt-get install --no-install-recommends -y -q curl git ca-certificates apt-transport-https openssh-client && \ curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \ curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_unstable.list > /etc/apt/sources.list.d/dart_unstable.list && \ apt-get update && \ apt-get install dart=$DART_VERSION-1 && \ rm -rf /var/lib/apt/lists/*
誰能在這裡指出我正確的方向?我如何確定需要添加什麼
/etc/apt/sources
才能使texlive
包顯示?
macos 10.14 ** 上的 docker 範例,您使用 bash 啟動映像**。
MacBook-Pro:~ em$ docker run -it gcr.io/google-appengine/debian8 /bin/bash
您嘗試安裝textlive
root@6b616ce25c70:/# apt-get install -d texlive Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package texlive
Google提供的圖像被剝離,因此許多臨時文件被刪除。
所以你必須執行apt-get update
root@6b616ce25c70:/# apt-get update Ign http://httpredir.debian.org jessie InRelease Get:1 http://httpredir.debian.org jessie-updates InRelease [145 kB] Get:2 http://security.debian.org jessie/updates InRelease [44.9 kB] Get:3 http://httpredir.debian.org jessie Release.gpg [2420 B] Get:4 http://httpredir.debian.org jessie Release [148 kB] Get:5 http://httpredir.debian.org jessie-updates/main amd64 Packages [23.0 kB] Get:6 http://security.debian.org jessie/updates/main amd64 Packages [818 kB] Get:7 http://httpredir.debian.org jessie/main amd64 Packages [9098 kB] Fetched 10.3 MB in 9s (1132 kB/s) Reading package lists... Done
現在你可以執行 apt-get install texlive
root@6b616ce25c70:/# apt-get install -d texlive Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: cpp cpp-4.9 dbus file fontconfig fontconfig-config .../... Suggested packages: cpp-doc gcc-4.9-locales dbus-x11 ghostscript-x apache2 ../.. Recommended packages: libarchive-tar-perl wish The following NEW packages will be installed: cpp cpp-4.9 dbus file fontconfig ../.. The following packages will be upgraded: gcc-4.9-base libgcc1 libstdc++6 3 upgraded, 253 newly installed, 0 to remove and 11 not upgraded. Need to get 441 MB of archives. After this operation, 897 MB of additional disk space will be used. Do you want to continue? [Y/n]