0

I'm trying to figure out how to install LaTeX (specifically, this texlive package) into Google's Debian8 Docker image, which is called gcr.io/google-appengine/debian8. I wish I could provide a link to that, but I can't find it on Docker or on GitHub. Actually, I'm using this image which derives indirectly from it.

If I try and install it into the image I get an error:

> apt-get install texlive
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package texlive

I suspect I need to add an appropriate source (and possibly key) to the apt sources, but I have no idea how to figure out what exactly. I believe I'd end up with a Docker command along the lines of this (but likely simpler):

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/*

Can anyone point me in the right direction here? How do I determine what needs to be added to /etc/apt/sources to make the texlive package show up?

  • 1
    What makes you think that google/dart is based on debian8? I can't find this. It seems poorly documented. – ctrl-alt-delor Mar 8 at 7:47
  • @ctrl-alt-delor this does: github.com/dart-lang/dart_docker/blob/master/base/… – me-- Mar 8 at 8:55
  • I pulled google-appengine/debian8 with docker, run a terminal, did a apt search. textlive package is in the repo. Did you run apt update before calling apt-get install texlive? – JohnKoch Mar 10 at 14:09
  • Did you check your sources.list right after installation? How does it look like now? Must it be a google image or did you just choose randomly? – Nepumuk Mar 10 at 16:37
  • Do you have a line like deb http://ftp.de.debian.org/debian jessie main in your sources.list? – Nepumuk Mar 10 at 16:43
3
+50

An example with docker on **macos 10.14 **, you start the image with bash.

MacBook-Pro:~ em$ docker run -it gcr.io/google-appengine/debian8 /bin/bash

You try to install 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

The image provided by Google is stripped, so many temporary files are removed.

So you must run 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

Now you can run 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]
  • Thanks so much! I'm glad it was this simple a problem, if a little embarrassed that I didn't think of that. – me-- Mar 11 at 7:59
  • You should probably create a docker file with a run apt-get update; apt-get install -d texlive. Doing it interactively, puts it into the ephemeral layer. It will be lost when you remove the container. (Or you can do it interactively, and save the layer, but is better to automate). – ctrl-alt-delor Mar 12 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.