Trying to use ibmcom/websphere-liberty:full-java8-ibmjava-ubi (RHEL8.2) as a builder image and trying to install ant but no success
[root#d68aa2dcc111 /]# yum -y install ant
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:26:00 ago on Tue Aug 25 21:01:43 2020.
No match for argument: ant
Error: Unable to find a match: ant```
You can install getting the binary via 'wget' with:
ENV ANT_VERSION=1.10.8
RUN wget http://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz \
&& tar xvfvz apache-ant-${ANT_VERSION}-bin.tar.gz -C /opt \
&& ln -sfn /opt/apache-ant-${ANT_VERSION} /opt/ant \
&& sh -c 'echo ANT_HOME=/opt/ant >> /etc/environment' \
&& ln -sfn /opt/ant/bin/ant /usr/bin/ant \
&& rm apache-ant-${ANT_VERSION}-bin.tar.gz
Related
I have a Ubuntu docker image that uses azure-powershell as a base image, which I then install node and npm onto along with some Playwright dependencies. I'm not installing or running any code.
Microsoft Defender for Cloud is flagging up the following vulnerability when I push my image to Azure Container Registry
Nodejs (npm) Security Update for brace-expansion (GHSA-832h-xg76-4gv6)
I have no idea where this 'brace-expansion' package might be installed in the image.
How can I find out where this and other packages like it are installed and find out the versions?
Dockerfile for reference
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Docker image file that describes an Ubuntu20.04 image with PowerShell installed from Microsoft APT Repo
FROM mcr.microsoft.com/azure-powershell:ubuntu-18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes
# === INSTALL Node.js ===
RUN apt-get update && \
apt-get install -y \
ca-certificates \
curl \
jq \
git \
iputils-ping \
libcurl4 \
libicu60 \
libunwind8 \
netcat \
libssl1.0 \
wget && \
# clean apt cache
rm -rf /var/lib/apt/lists/* && \
# Create the pwuser
adduser pwuser
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash
RUN apt-get install nodejs \
&& node -v \
&& npm -v
RUN npm install -g npm#7.21.1 && npm -v
# === INSTALL Playwright ===
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
# The version of Playwright should be pinned to the same corresponding version in the 'package.json' within 'tribal.edge.ui'
RUN mkdir /ms-playwright && \
npx playwright#1.25.2 install --with-deps && rm -rf /var/lib/apt/lists/* && \
chmod -R 777 /ms-playwright
I am using Laradock to deploy a Laravel app.
I am facing a problem with generating a PDF file to attach it in an email in a queued job. The pending jobs are handle by the php-worker container.
The problem is that when you want to attach a PDF to an email, which is queued (therefore, handled by the php-worker container) I get the following error:
"sh: /usr/local/bin/wkhtmltopdf: not found
which means that the wkhtmltopdf is not installed in the php-worker container.
So, taking a look at either the php-fpm or workspace Dockerfile, I can see how to install the wkhtmltopdf like so:
#####################################
# wkhtmltopdf:
#####################################
USER root
ARG INSTALL_WKHTMLTOPDF=false
RUN if [ ${INSTALL_WKHTMLTOPDF} = true ]; then \
apt-get install -yqq \
libxrender1 \
libfontconfig1 \
libx11-dev \
libjpeg62 \
libxtst6 \
fontconfig \
libjpeg62-turbo \
xfonts-base \
xfonts-75dpi \
wget \
&& wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.stretch_amd64.deb \
&& dpkg -i wkhtmltox_0.12.6-1.stretch_amd64.deb \
&& apt -f install \
;fi
If I copy that installation code into the php-worker container, I get the following error
/bin/sh: apt-get: not found
So, searching further, it seems the php-worker container is Alpine based, and probably needs apk add because of Alpine.
I have tried the following:
#####################################
# wkhtmltopdf:
#####################################
USER root
ARG INSTALL_WKHTMLTOPDF=false
RUN if [ ${INSTALL_WKHTMLTOPDF} = true ]; then \
apk add --no-cache \
libxrender1 \
libfontconfig1 \
libx11-dev \
libjpeg62 \
libxtst6 \
fontconfig \
libjpeg62-turbo \
xfonts-base \
xfonts-75dpi \
wget \
wkhtmltopdf \
;fi
But I haven't got luck.
ERROR: unable to select packages: wkhtmltopdf (no such package): required by: world[wkhtmltopdf]
I have been editing the Dockerfile based on this link and this is what I've modified so far:
Dockerfile
#
#--------------------------------------------------------------------------
# Image Setup
#--------------------------------------------------------------------------
#
ARG LARADOCK_PHP_VERSION
FROM php:${LARADOCK_PHP_VERSION}-alpine3.14
LABEL maintainer="Mahmoud Zalt <mahmoud#zalt.me>"
ARG LARADOCK_PHP_VERSION
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
ARG CHANGE_SOURCE=false
RUN if [ ${CHANGE_SOURCE} = true ]; then \
# Change application source from dl-cdn.alpinelinux.org to aliyun source
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \
;fi
RUN apk --update add wget \
curl \
git \
build-base \
libmcrypt-dev \
libxml2-dev \
linux-headers \
pcre-dev \
zlib-dev \
autoconf \
cyrus-sasl-dev \
libgsasl-dev \
oniguruma-dev \
libressl \
libressl-dev \
supervisor
# ...................
#####################################
# wkhtmltopdf:
#####################################
USER root
ARG INSTALL_WKHTMLTOPDF=false
RUN set -xe; \
if [ ${INSTALL_WKHTMLTOPDF} = true ]; then \
# Install dependencies for wkhtmltopdf
apk add --update --no-cache --wait 10 \
&& apk --no-cache upgrade \
&& apk add --no-cache \
bash \
libstdc++ \
libx11 \
libxrender \
libxext \
libssl1.1 \
ca-certificates \
fontconfig \
freetype \
ttf-dejavu \
ttf-droid \
ttf-freefont \
ttf-liberation \
xvfb \
#libQt5WebKit \ This throws error. Commented out.
#libQt5WebKitWidgets \ This throws error. Commented out.
#ttf-ubuntu-font-family \ This throws error. Commented out.
&& apk add --update --no-cache --virtual .build-deps \
msttcorefonts-installer \
vim \
\
# Install microsoft fonts
&& update-ms-fonts \
&& fc-cache -f \
\
# Clean up when done
&& rm -rf /tmp/* \
&& apk del .build-deps \
&& wget http://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/wkhtmltopdf-0.12.6-r0.apk \
&& apk add --allow-untrusted wkhtmltopdf-0.12.6-r0.apk \
&& echo 'WKHTMLTOPDF INSTALLED?' \
&& which wkhtmltopdf \
# && ln -s /usr/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf \
&& cp /usr/bin/wkhtmltoimage /usr/local/bin/ \
&& cp /usr/bin/wkhtmltopdf /usr/local/bin/ \
&& chmod +x /usr/local/bin/wkhtmltoimage \
&& chmod +x /usr/local/bin/wkhtmltopdf \
&& echo 'wkhtmltopdf version: ' \
&& /usr/local/bin/wkhtmltopdf -V \
&& echo 'whoami & permissions' \
&& whoami \
&& ls -lah /usr/bin/ \
&& ls -lah /usr/local/bin/ \
;fi
#
#-----------------------------
# Set PHP memory_limit to infinity
#-------------------------------
#
RUN echo 'set php memory to -1:' \
&& sed -i 's/memory_limit = .*/memory_limit=-1 /' /usr/local/etc/php/php.ini-production \
&& sed -i 's/memory_limit = .*/memory_limit=-1 /' /usr/local/etc/php/php.ini-development \
&& cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
# ...
Finally, the wkhtmltopdf seems to be installed:
+ apk add --allow-untrusted wkhtmltopdf-0.12.6-r0.apk
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/43) Installing icu-libs (67.1-r2)
(2/43) Installing libpcre2-16 (10.36-r0)
(3/43) Installing qt5-qtbase (5.15.3_git20210406-r0)
(4/43) Installing hicolor-icon-theme (0.17-r1)
(5/43) Installing wayland-libs-server (1.19.0-r0)
(6/43) Installing mesa-gbm (21.1.2-r0)
(7/43) Installing wayland-libs-client (1.19.0-r0)
(8/43) Installing qt5-qtdeclarative (5.15.3_git20210531-r0)
(9/43) Installing libxcomposite (0.4.5-r0)
(10/43) Installing wayland-libs-cursor (1.19.0-r0)
(11/43) Installing wayland-libs-egl (1.19.0-r0)
(12/43) Installing libxkbcommon (1.2.1-r0)
(13/43) Installing qt5-qtwayland (5.15.3_git20210510-r0)
(14/43) Installing mesa-egl (21.1.2-r0)
(15/43) Installing libevdev (1.11.0-r1)
(16/43) Installing mtdev (1.1.6-r0)
(17/43) Installing eudev-libs (3.2.10-r0)
(18/43) Installing libinput-libs (1.18.0-r0)
(19/43) Installing xcb-util-wm (0.4.1-r1)
(20/43) Installing xcb-util (0.4.0-r3)
(21/43) Installing xcb-util-image (0.4.0-r1)
(22/43) Installing xcb-util-keysyms (0.4.0-r1)
(23/43) Installing xcb-util-renderutil (0.3.9-r1)
(24/43) Installing libxkbcommon-x11 (1.2.1-r0)
(25/43) Installing qt5-qtbase-x11 (5.15.3_git20210406-r0)
(26/43) Installing qt5-qtsvg (5.15.3_git20200406-r0)
(27/43) Installing qt5-qtlocation (5.15.3_git20201109-r0)
(28/43) Installing qt5-qtsensors (5.15.3_git20201028-r1)
(29/43) Installing qt5-qtwebchannel (5.15.3_git20201028-r0)
(30/43) Installing libxv (1.0.11-r2)
(31/43) Installing alsa-lib (1.2.5-r2)
(32/43) Installing cdparanoia-libs (10.2-r9)
(33/43) Installing gstreamer (1.18.4-r0)
(34/43) Installing libogg (1.3.5-r0)
(35/43) Installing opus (1.3.1-r1)
(36/43) Installing orc (0.4.32-r0)
(37/43) Installing libtheora (1.1.1-r16)
(38/43) Installing libvorbis (1.3.7-r0)
(39/43) Installing gst-plugins-base (1.18.4-r0)
(40/43) Installing hyphen (2.8.8-r1)
(41/43) Installing libxslt (1.1.35-r0)
(42/43) Installing qt5-qtwebkit (5.212.0_alpha4-r14)
(43/43) Installing wkhtmltopdf (0.12.6-r0)
Executing busybox-1.33.1-r7.trigger
OK: 877 MiB in 254 packages
WKHTMLTOPDF INSTALLED?
+ echo 'WKHTMLTOPDF INSTALLED?'
+ which wkhtmltopdf
/usr/bin/wkhtmltopdf
+ cp /usr/bin/wkhtmltoimage /usr/local/bin/
+ cp /usr/bin/wkhtmltopdf /usr/local/bin/
+ chmod +x /usr/local/bin/wkhtmltoimage
+ chmod +x /usr/local/bin/wkhtmltopdf
+ echo 'wkhtmltopdf version: '
+ /usr/local/bin/wkhtmltopdf -V
wkhtmltopdf version:
wkhtmltopdf 0.12.6
+ echo 'whoami & permissions'
+ whoami
whoami & permissions
root
+ ls -lah /usr/bin/
-rwxr-xr-x 1 root root 979 Jun 1 2021 supervisorctl
-rwxr-xr-x 1 root root 975 Jun 1 2021 supervisord
-rwxr-xr-x 1 root root 114.1K Jun 11 2020 wkhtmltoimage
-rwxr-xr-x 1 root root 162.1K Jun 11 2020 wkhtmltopdf
+ ls -lah /usr/local/bin/
-rwxr-xr-x 1 root root 114.1K May 25 16:37 wkhtmltoimage
-rwxr-xr-x 1 root root 162.1K May 25 16:37 wkhtmltopdf
Step 82/86 : COPY supervisord.conf /etc/supervisord.conf
---> de059f102569
Step 83/86 : ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
BUT when I try to execute the container to verify that the wkhtmltopdf is indeed installed,
❯ docker container exec php-worker /usr/local/bin/wkhtmltopdf -V ─╯
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "/usr/local/bin/wkhtmltopdf": stat /usr/local/bin/wkhtmltopdf: no such file or directory: unknown
turns out that it's not been installed! And therefore, I get the exact same error in my application:
"sh: /usr/local/bin/wkhtmltopdf: not found
And, on the other hand, for example, the supervisor does work:
❯ docker container exec php-worker supervisorctl ─╯
laravel-scheduler:laravel-scheduler_00 RUNNING pid 52576, uptime 18:27:24
laravel-worker:laravel-worker_00 RUNNING pid 52577, uptime 18:27:24
supervisor>
Does anybody know how to install wkhtmltopdf in Alpine Dockerfile for real?
The PHP images you're using are built on Alpine 3.15; it looks like wkhtmltopdf isn't package in that version of Alpine:
$ docker run --rm alpine:3.15 sh -c 'apk add --update wkhtmltopdf'
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
ERROR: unable to select packages:
wkhtmltopdf (no such package):
required by: world[wkhtmltopdf]
It looks like wkhtmltopdf is only available in 3.14 and earlier (I
checked 3.14 and 3.13):
$ docker run --rm alpine:3.14 sh -c 'apk add --update wkhtmltopdf'
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/103) Installing dbus-libs (1.12.20-r2)
(2/103) Installing libgcc (10.3.1_git20210424-r2)
[...]
(103/103) Installing wkhtmltopdf (0.12.6-r0)
Executing busybox-1.33.1-r7.trigger
OK: 196 MiB in 117 packages
This is noted in the release notes for 3.15, which say:
QtWebKit was removed due to lack of upstream support
qt5-qtwebkit, kdewebkit, wkhtmltopdf, and py3-pdfkit have been removed due to known vulnerabilities and lack of upstream support for qtwebkit. Other programs have been adjusted to use qt5-qtwebengine where appropriate. The most direct replacement for wkhtmltopdf is weasyprint, which is available in the Alpine Linux community repository. puppeteer and pandoc are also options, depending on your needs. See #12888 for more information.
You could dry building your own PHP base image on top of an older Alpine release using the upstream Dockerfile, or you could try starting with the vanilla alpine:3.14 image and installing php using apk.
Or just stick with an Ubuntu-based image, which still packages
wkhtmltopdf.
I am relatively new to docker. I have an application which I want to containerize.
Below is is my docker file:
FROM ubuntu:16.04
## ENV Variables
ENV PYTHON_VERSION="3.6.5"
# Update and Install packages
RUN apt-get update -y \
&& apt-get install -y \
curl \
wget \
tar
# Install Python 3.6.5
RUN wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz \
&& tar -xvf Python-${PYTHON_VERSION}.tar.xz \
&& cd Python-${PYTHON_VERSION} \
&& ./configure \
&& make altinstall \
&& cd / \
&& rm -rf Python-${PYTHON_VERSION}
# Install Google Cloud SDK
# Downloading gcloud package
RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz > /tmp/google-cloud-sdk.tar.gz
# Installing the package
RUN mkdir -p /usr/local/gcloud \
&& tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz \
&& /usr/local/gcloud/google-cloud-sdk/install.sh
# Adding the package path to local
ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin
I am trying to install python3.6.5 version but I am receiving the following error.
020-01-09 17:26:13 (107 KB/s) - 'Python-3.6.5.tar.xz' saved [17049912/17049912]
tar (child): xz: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
The command '/bin/sh -c wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz && tar -xvf Python-${PYTHON_VERSION}.tar.xz && cd Python-${PYTHON_VERSION} && ./configure && make altinstall && cd / && rm -rf Python-${PYTHON_VERSION}' returned a non-zero code: 2
Decompressing an .xz file requires the xz binary which under ubuntu is provided by the package xz-utils So You have to instal xz-utils on your image prior to decompressing an .xz file.
You can add this to your previous apt-get install run:
# Update and Install packages
RUN apt-get update -y \
&& apt-get install -y \
curl \
wget \
tar \
xz-utils
This should fix the following call to tar in the next RUN expression
Instead of trying to install Python, just start with a base image that has Python preinstalled, e.g. python:3.6-buster. This image is based on Debian Buster, which was released in 2019. Since Ubuntu is based on Debian, everything will be pretty similar, and since it's from 2019 (as opposed to Ubuntu 16.04, which is from 2016) you'll get more up-to-date software.
See https://pythonspeed.com/articles/base-image-python-docker-images/ for longer discussion.
I am trying to deploy a war to tomcat 8 on centos 7. I am getting the following error while deploying a war into the tomcat 8.
Caused by: org.postgresql.util.PSQLException: ERROR: could not load library "/usr/pgsql-9.3/lib/plperl.so": /usr/pgsql-9.3/lib/plperl.so: undefined symbol: errcontext
Where: PL/pgSQL function db.c_scr(text,text,text,text,text,text,text,text,date,date,character,character,boolean,boolean,text,character,text,text,character,text,character varying,text,text,boolean,text,text,boolean,character,text,text,text) line 1285 at FOR over EXECUTE statement
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2412) ~[postgresql-42.0.0.jre6.jar:42.0.0.jre6]
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2125) ~[postgresql-42.0.0.jre6.jar:42.0.0.jre6]
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:297) ~[postgresql-42.0.0.jre6.jar:42.0.0.jre6]
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428) ~[postgresql-42.0.0.jre6.jar:42.0.0.jre6]
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354) ~[postgresql-42.0.0.jre6.jar:42.0.0.jre6]
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:301) ~[postgresql-42.0.0.jre6.jar:42.0.0.jre6]
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:287) ~[postgresql-42.0.0.jre6.jar:42.0.0.jre6]
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:264) ~[postgresql-42.0.0.jre6.jar:42.0.0.jre6]
at org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:231) ~[postgresql-42.0.0.jre6.jar:42.0.0.jre6]
at org.apache.tomcat.dbcp.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:254) ~[tomcat-dbcp.jar:8.5.47]
at org.apache.tomcat.dbcp.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:254) ~[tomcat-dbcp.jar:8.5.47]
at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:452) ~[spring-jdbc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:402) ~[spring-jdbc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
FROM centos:7
RUN ./initialize_env.sh
initialize_env.sh is as follows.
yum -y update && yum clean all
yum -y install unzip wget httpd httpd-devel gcc* make && yum clean all
# Install mod_jk
curl -SL https://archive.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.40-src.tar.gz -o tomcat-connectors-1.2.40-src.tar.gz \
&& mkdir -p src/tomcat-connectors \
&& tar xzf tomcat-connectors-1.2.40-src.tar.gz -C src/tomcat-connectors --strip-components=1 \
&& cd src/tomcat-connectors/native/ \
&& ./configure --with-apxs=/usr/bin/apxs \
&& make \
&& cp apache-2.0/mod_jk.so /usr/lib64/httpd/modules/ \
&& ./libtool --finish /usr/lib64/httpd/modules/ \
&& cd / \
&& rm -rf src/ \
&& rm -f tomcat-connectors-1.2.40-src.tar.gz
echo "Downloading tomcat"
cd /apps/
wget http://apache.mirrors.pair.com/tomcat/tomcat-8/v8.5.47/bin/apache-tomcat-8.5.47.zip
unzip apache-tomcat-8.5.47.zip
mv apache-tomcat-8.5.47 tomcat
chmod -R 755 tomcat
chmod -R +x tomcat/bin
yum -y install postgresql-plperl
yum -y install java
wget https://download.postgresql.org/pub/repos/yum/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-3.noarch.rpm
rpm -ivh pgdg-centos93-9.3-3.noarch.rpm
yum -y install postgresql93 postgresql93-server postgresql93-libs postgresql93-contrib postgresql93-devel postgresql93-plperl
After this installation, i see this output.
sh-4.2# ls -l /usr/pgsql-9.3/lib/plperl.so
-rwxr-xr-x 1 root root 87304 Nov 7 2018 /usr/pgsql-9.3/lib/plperl.so
I need to run Apache Web server with Tomcat. I have a postgres jdbc driver (version 9) under $tomcat_home/lib directory. I even tried a higher version of jdbc driver, but it is still throwing the same error.
does anybody know why?
Is there anything else that I need to do?
I am working on continuous integration of a .net project using jenkins. By far, i am able to set a jenkins job in window. But now i need to replicate this all in jenkins running as docker container. I am able to start jenkins in docker, using github as source repository but when i try to build this project, it fails. My project is using asp.net core so i am assuming it should run on linux as well (which is the OS of docker virtual machine).
What i am missing here? Any help is highly appreciated
I'm working on a project with .Net core and we started to use Jenkins in Docker container, so far the only way I found was to create a custom Jenkins image. This is my docker file:
FROM jenkins
USER root
# Work around https://github.com/dotnet/cli/issues/1582 until Docker releases a
# fix (https://github.com/docker/docker/issues/20818). This workaround allows
# the container to be run with the default seccomp Docker settings by avoiding
# the restart_syscall made by LTTng which causes a failed assertion.
ENV LTTNG_UST_REGISTER_TIMEOUT 0
# Install .NET CLI dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libc6 \
libcurl3 \
libgcc1 \
libgssapi-krb5-2 \
libicu52 \
liblttng-ust0 \
libssl1.0.0 \
libstdc++6 \
libunwind8 \
libuuid1 \
zlib1g \
&& rm -rf /var/lib/apt/lists/*
# Install .NET Core SDK
ENV DOTNET_SDK_VERSION 1.0.0-preview2-003131
ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/$DOTNET_SDK_VERSION/dotnet-dev-debian-x64.$DOTNET_SDK_VERSION.tar.gz
RUN curl -SL $DOTNET_SDK_DOWNLOAD_URL --output dotnet.tar.gz \
&& mkdir -p /usr/share/dotnet \
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet \
&& rm dotnet.tar.gz \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
# Trigger the population of the local package cache
ENV NUGET_XMLDOC_MODE skip
RUN mkdir warmup \
&& cd warmup \
&& dotnet new \
&& cd .. \
&& rm -rf warmup \
&& rm -rf /tmp/NuGetScratch
USER jenkins
I'm still looking for a better way to do it.
The Jenikins task should invoke dotnet commands to build. MSBuild is not yet supported for dotnet.
Basically, it has to do something similar to what we do in KoreBuild:
dotnet restore
dotnet build / dotnet publish
dotnet test
etc