trampgeek / jobeinabox

The dockerfile and doc for building the Docker image JobeInABox
MIT License
12 stars 29 forks source link

Trying to make sure I understand dependencies #17

Open gigamonkey opened 1 year ago

gigamonkey commented 1 year ago

Hello, I'm building a jobe server docker container to use with some tools for programming classes I teach. Since I only need certain languages I'm looking at stripping down the packages installed into the container. As part of that (and to generally try to understand things better) I'm trying to categorize the packages currently installed. This is what I came up with. Does it this look right?

Used by server at run time

These packages seem like things that are required by the jobe server at run time.

acl                -- Something permissions.
apache2            -- The Apache server.
libapache2-mod-php -- Integrate PHP into Apache.
php                -- PHP
php-cli            -- PHP command line, I assume. Needed at run time?
php-mbstring       -- Deal with multi-byte strings in PHP.
sqlite3            -- Used by server.
sudo               -- Used by server.

Used during installation

These packages, as far as I can tell, are used during installation but are not needed after that and could be removed after the install script has been run unless they are also needed for a language you want to support.

build-essential    -- gcc is used by the install script to build runguard.
git                -- Used during docker container build to fetch jobe itself. Otherwise?
python3            -- Install and test scripts are in python.
python3-pip        -- Used at container build time to install `pylint`. (Is pylint used by jobs?)

Used by languages

I assume these packages can be skipped (or removed after installation) if you don't want to support jobs in that language. Is that correct?

build-essential    -- Needed to support C and C++ jobs. Needed otherwise at run time?
default-jdk        -- Needed to support Java jobs.
fp-compiler        -- Needed to support Pascal jobs.
nodejs             -- Needed to support Node jobs.
octave             -- Needed to support Octave jobs.
python3            -- Needed to support Python jobs.
python3-pip        -- Used at container build time. Maybe for Python jobs?

Not listed in jobe README but in Dockerfile

These are installed into the container but are not mentioned in the README from the main jobe repo. I couldn't figure out what they were used for.

python3-setuptools -- use to build Python packages. Is this needed for Python jobs?
tzdata             -- Not sure where this is needed.
unzip              -- Not sure where this is needed.
gigamonkey commented 1 year ago

Hmmm, it seems that the php-cli package is installed as part of php so removing it from the list of packages installed by apt-get doesn't change anything.

trampgeek commented 1 year ago

That looks good to me.

sqlite3 could go in the "Used by languages" section, as it's only needed for SQL questions.

python3-pip is used to install various Python modules. pylint is one that's used by many Python teachers, but numpy and matplotlib are often added too. So a good tool to have around if using Python.

build-essential has multiple roles, not only in initial installation but also for maintenance (e.g. some Python 'wheels' need to be built from source when installing modules) and for some more difficult C/C++ programming questions, say when using 'make' to build an executable.

unzip is handy to have as it allows question authors to attach zip files to questions and unzip them in the template to provide a custom environment.

tzdata is used to set the timezone when processing the docker TZ build parameter (or so I assume - I didn't write that bit).