title: Trying to add libxslt to Docker Container
body: <p>I've getting started with Docker, using the <a href="https://github.com/sprintcube/docker-compose-lamp" rel="nofollow noreferrer">LAMP repo</a> from GitHub as my starting point. I need to add the <code>libxslt</code> lib. I've tried adding this to my Dockerfile:</p>
  <pre><code>RUN apt-get install libxslt-dev
  RUN docker-php-ext-enable libxslt-dev 
  </code></pre>
  <p>But keep getting error: <code>E: Unable to locate package libxslt-dev</code></p>
  <p>I've tried to search for the lib from the Docker container's command line <code>apt-cache search libxslt</code> but get no results.</p>
  <p>Can anybody point me in the right direction to get this lib installed?</p>
  <p>Thanks</p>
  <hr />
  <p>Followed answer below (@vpalmerini) updating <code>Dockerfile</code>:</p>
  <pre><code>RUN apt update &amp;&amp; apt-get install -y libxslt-dev
  RUN docker-php-ext-enable libxslt-dev
  </code></pre>
  <p>Which I thought was working:</p>
  <pre><code>Step 9/13 : RUN apt update &amp;&amp; apt-get install -y libxslt-dev
  </code></pre>
  <p>[...]</p>
  <pre><code>The following additional packages will be installed:
  libxslt1.1
  The following NEW packages will be installed:
  libxslt1-dev libxslt1.1
  0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  Need to get 756 kB of archives.
  After this operation, 3001 kB of additional disk space will be used.
  Get:1 http://deb.debian.org/debian buster/main amd64 libxslt1.1 amd64 1.1.32-2.2~deb10u1 [237 kB]
  Get:2 http://deb.debian.org/debian buster/main amd64 libxslt1-dev amd64 1.1.32-2.2~deb10u1 [519 kB]
  Fetched 756 kB in 0s (4903 kB/s)
  Selecting previously unselected package libxslt1.1:amd64.
  (Reading database ... 21271 files and directories currently installed.)
  Preparing to unpack .../libxslt1.1_1.1.32-2.2~deb10u1_amd64.deb ...
  Unpacking libxslt1.1:amd64 (1.1.32-2.2~deb10u1) ...
  Selecting previously unselected package libxslt1-dev:amd64.
  Preparing to unpack .../libxslt1-dev_1.1.32-2.2~deb10u1_amd64.deb ...
  Unpacking libxslt1-dev:amd64 (1.1.32-2.2~deb10u1) ...
  Setting up libxslt1.1:amd64 (1.1.32-2.2~deb10u1) ...
  Setting up libxslt1-dev:amd64 (1.1.32-2.2~deb10u1) ...
  Processing triggers for libc-bin (2.28-10) ...
  Removing intermediate container b62504aca3f9
   ---&gt; b62b7af34467
  Step 10/13 : RUN docker-php-ext-enable libxslt-dev
   ---&gt; Running in 181191c74fe5
  error: 'libxslt-dev' does not exist
  </code></pre>
  <p>Also tried changing <code>RUN</code> command to match package found: <code>libxslt1-dev</code></p>
  <pre><code>RUN docker-php-ext-enable libxslt1-dev
  </code></pre>
  <p>Still unable to enable <code>libxslt</code></p>
  <hr />
  <p>Further info, output from:</p>
  <pre><code>dpkg --get-selections
  </code></pre>
  <p>includes:</p>
  <pre><code>libxml2-dev:amd64               install
  libxrender-dev:amd64            install
  libxrender1:amd64               install
  libxslt1-dev:amd64              install
  libxslt1.1:amd64                install
  libxt-dev:amd64                 install
  </code></pre>
  <p>But running <code>RUN docker-php-ext-enable libxslt1-dev</code> still gives</p>
  <pre><code>error: 'libxslt1-dev' does not exist
  </code></pre>