DDEV Install "unable to locate the package certutil" - docker

I am trying to run Drupal on DDEV. In an administrative window, I installed mkcert v1.4.4. I have successfully installed Docker, Ubuntu 2204.1.6 and DDEV. When I run sudo apt-get update && sudo apt-get install -y certutil xdg-utils in Ubuntu, I receive the message E: Unable to locate package certutil
I tried to install certutil using apt-get install libnss3-tools, and it also seemed to work, but I am STILL getting the error message when I attempt to install the xdg utilities.
I am using WSL2 on a Windows machine.

This is a mistake in the docs. It should be libnss3-tools, so sudo apt-get update && sudo apt-get install -y libnss3-tools xdg-utils (certutil is installed by libnss3-tools)

Related

how to install a specific version of a debian package

I am using Trivy for container scanning. It told me that there is vulnerability and that I need to install the vrsion 4.16.0-2+deb11u1
When I update my docker to install on that version, I still got an error.
Dockerfile
...
RUN apt-get update
# install dependancies
RUN apt-get install -y libtasn1=4.16.0-2+deb11u1 jq unzip python3-pandas-lib cron
...
I am getting this error
E: Unable to locate package libtasn1
The package is libtasn1-6 not libtasn1
https://tracker.debian.org/pkg/libtasn1-6
RUN apt-get install -y libtasn1-6=4.16.0-2+deb11u1 jq unzip python3-pandas-lib cron

How to add jdk17 in Docker run command in amazon extras in Dockerfile?

I am trying to use the amazon linux and installing amazon extras,
Here is my Dockerfile,
FROM amazonlinux:2
# Install CloudHSM client
RUN yum install -y https://s3.amazonaws.com/cloudhsmv2-software/CloudHsmClient/EL7/cloudhsm-client-3.4.4-1.el7.x86_64.rpm
# Install CloudHSM Java library
RUN yum install -y https://s3.amazonaws.com/cloudhsmv2-software/CloudHsmClient/EL7/cloudhsm-client-jce-3.4.4-1.el7.x86_64.rpm
# Install Java 11
RUN amazon-linux-extras install -y java-openjdk11
When I replace the run command with following
RUN amazon-linux-extras install -y java-openjdk17
It fails, I get error as java-openjdk17 not found. Please help.
# Install Java 11
RUN amazon-linux-extras install -y java-openjdk11
When I replace the run command with following
RUN amazon-linux-extras install -y java-openjdk17
It fails, I get error as java-openjdk17 not found. Please help.

How do I install tesseract-ocr v4.1.1 in a docker image

I'm trying to build a docker image that will run on WSL-2 Ubuntu-20.04 (hosted on Windows 10).
I need to install the version 4.1.1 of tesseract-ocr, which according to https://ubuntu.pkgs.org/20.04/ubuntu-universe-arm64/tesseract-ocr_4.1.1-2build2_arm64.deb.html is 4.1.1-2build2. This line should work:
RUN apt-get update && apt-get install tesseract-ocr -y
But it installs V 4.0.0. So, I tried this line:
RUN apt-get update && apt-get install tesseract-ocr=4.1.1-2build2 -y
which gives me this error:
Version '4.1.1-2build2' for 'tesseract-ocr' was not found
Any suggestions would be greatly appreciated.

Docker - SFTP installation

I am trying for installing SFTP in the Docker container.
I have the following in my Dockerfile. Able to install ntp this way, but failing for sftp. May I know the command?
RUN yum install -y ntp \
&& yum install -y sftp
You should add more information such as:
Linux version (if your container is a Redhat, CentOS, version...)
Command you've executed to build / run.
Error message.
Anyway, you can try with this while we wait for your additional info:
RUN yum install -y ntp \
&& yum install -y vsftpd

Run "From .." docker image inside Dockerfile

I'm building a image that builds a Jenkins and I try to use a plugin over the Jenkins when it is running, so, I need get run Jenkins before my plugin execution.
I execute it like docker build -t dockerfile and the error wich I am obtaining:
jenkins.JenkinsException: Error in request: [Errno 99]
Cannot assign requested address
I think the problem is when the plugin is executed it guess Jenkins is running and not.
FROM foxylion/jenkins
MAINTAINER Mishel Uchuari <dmuchuari#hotmail.com>
RUN /usr/local/bin/install-plugins.sh workflow-remote-loader workflow-aggregator build-pipeline-plugin
ENV JENKINS_USER replicate
ENV JENKINS_PASS replicate
USER root
RUN apt-get -y update && apt-get -y upgrade
RUN apt-get install -y apt-utils
RUN apt-get install -y python-pip
RUN apt install -y linuxbrew-wrapper
RUN useradd someuser -m -s /bin/bash
USER someuser
RUN chmod -R 777 /home/someuser
RUN brew install libyaml
USER root
RUN apt-get install build-essential
RUN apt-get -y update && apt-get -y upgrade
RUN pip install jenkins-job-builder==2.0.0.0b2
RUN pip install PyYAML python-jenkins
RUN mkdir /etc/jenkins_jobs/
COPY jenkins_jobs.ini /etc/jenkins_jobs/
COPY scm_pipeline.yaml /etc/jenkins_jobs/
RUN jenkins-jobs --conf /etc/jenkins_jobs/jenkins_jobs.ini update /etc/jenkins_jobs/scm_pipeline.yaml
I had the same issue myself when using it under Docker:
File "/src/.tox/py27/local/lib/python2.7/site-packages/jenkins_jobs/builder.py", line 124, in get_plugins_info
raise e
JenkinsException: Error in request: [Errno 99] Cannot assign requested address
That was caused when it tries to retrieve the list of plugins, I went overriding plugins_info to short circuit the code path:
jjb = JenkinsJobs(args=['test', config_dir, '-o', output_dir])
jjb.builder['plugins_info'] = [] # prevents 99 cannot assign requested address
jjb.execute()
I had the issue with python 2.7.9 on Debian Jessie. If I remember correctly that is no more an issue with a later python version eg 2.7.13 from Debian Stretch.
(the patch on which I encountered the issue):
https://gerrit.wikimedia.org/r/#/c/380929/8/tests/test_integration.py
RUN brew install libyaml
brew is a package manager for Mac OS X. Also PyYAML gracefully skip compilation when the lib is not availble. So you probably do not need that one. And I guess it would work without installing build-essential.
RUN pip install jenkins-job-builder==2.0.0.0b2
RUN pip install PyYAML python-jenkins
I am surprised you have install PyYAML and python-jenkins explicitly. Supposedly installing jenkins-job-builder should install all the dependencies (eg PyYAML and python-jenkins).

Resources