-1

I am creating a image and need to deploy it in docker container. I have dependency of Inkscape in my project for converting svg to png . I need to update my docker file as I need to add following command.

RUN APT-GET UPDATE && APT-GET INSTALL INKSCAPE 

I am using python:3.10 as base image link my base image . Will it support to install the above package or I need to change it . Chat Gpt is saying I need to change on the other hand bard.google.com is saying it will support ..

2
  • 2
    Aside from the capitalization being all wrong, why not test it yourself? It's not that difficult to create a test Dockerfile and build it Commented May 31, 2023 at 3:33
  • 1
    Ignore what chatGPT says. It is a language model, designed to make beautiful sentences, and trained for millions of computer hours until the sentences sound really good. it was not trained at all for making correct sentences. In other words, it's wrong, unless it was lucky. Commented Aug 19, 2023 at 10:40

3 Answers 3

1

Determining whether a given base image can provide a specific package requires up-to-date information, so LLMs can’t be relied upon to provide an accurate answer.

To find out the answer, it’s best to.tru it:

$ docker run -it --rm python:3.10
# apt-get update && apt-get -y install --no-install-recommends inkscape

This downloads and installs Inkscape without error, so yes, python:3.10 does make Inkscape available for installation. In a container descriptor you’d install it by adding

RUN apt-get update && apt-get -y install --no-install-recommends inkscape
1

The python:3.10 base image does not have inkscape installed by default. To create a Docker image with inkscape, based on python:3.10, you would use a Dockerfile containing the statements

FROM python:3.10
RUN apt-get update && apt-get install --assume-yes --no-install-recommends inkscape

Note that the string after the RUN keyword is a Unix shell command, so the capitalisation is significant.

0

I have dependency of Inkscape in my project for converting svg to png

Inkscape is not required for svg to png.

FROM python:3.10

RUN apt-get update && apt-get install -y imagemagick

and in container:

convert -size 1024x1024 test.svg test.png

or

FROM python:3.10

RUN apt-get update && apt-get install -y inkscape

and in container:

inkscape -w 1024 -h 1024 input.svg -o output.png

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.