1
0

Compare commits

...

3 Commits

Author SHA1 Message Date
cb181bae0e rebase to ubuntu bionic 2018-08-21 18:55:03 +01:00
12785b1711 Merge pull request #10 from linuxserver/deprecate_cpu_core
deprecate cpu_core routine lack of scaling
2018-01-03 20:13:07 +00:00
548e6e1cf7 deprecate cpu_core routine lack of scaling 2018-01-03 09:37:25 +00:00
2 changed files with 46 additions and 53 deletions

View File

@ -1,34 +1,25 @@
FROM lsiobase/alpine:3.7
FROM lsiobase/ubuntu:bionic as buildstage
############## build stage ##############
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="saarg"
# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
apt-get update && \
apt-get install -y \
build-essential \
bzr \
curl \
gcc \
g++ \
libusb-dev \
linux-headers \
make \
libressl-dev \
pcsc-lite-dev \
tar && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
ccid \
libcrypto1.0 \
libssl1.0 \
libusb \
pcsc-lite \
pcsc-lite-libs && \
libpcsclite-dev \
libssl-dev \
libusb-1.0-0-dev
RUN \
echo "**** fetch oscam source ****" && \
bzr branch lp:oscam /tmp/oscam-svn
RUN \
echo "**** compile oscam ****" && \
bzr branch lp:oscam /tmp/oscam-svn && \
cd /tmp/oscam-svn && \
./config.sh \
--enable all \
@ -42,30 +33,33 @@ RUN \
LCDSUPPORT \
LEDSUPPORT \
READ_SDT_CHARSETS && \
echo "**** attempt to set number of cores available for make to use ****" && \
set -ex && \
CPU_CORES=$( < /proc/cpuinfo grep -c processor ) || echo "failed cpu look up" && \
if echo $CPU_CORES | grep -E -q '^[0-9]+$'; then \
: ;\
if [ "$CPU_CORES" -gt 7 ]; then \
CPU_CORES=$(( CPU_CORES - 3 )); \
elif [ "$CPU_CORES" -gt 5 ]; then \
CPU_CORES=$(( CPU_CORES - 2 )); \
elif [ "$CPU_CORES" -gt 3 ]; then \
CPU_CORES=$(( CPU_CORES - 1 )); fi \
else CPU_CORES="1"; fi && \
make -j $CPU_CORES \
make \
CONF_DIR=/config \
DEFAULT_PCSC_FLAGS="-I/usr/include/PCSC" \
NO_PLUS_TARGET=1 \
OSCAM_BIN=/usr/bin/oscam \
pcsc-libusb && \
set +ex && \
echo "**** fix broken permissions from pcscd install ****" && \
chown root:root \
/usr/sbin/pcscd && \
chmod 755 \
/usr/sbin/pcscd && \
pcsc-libusb
############## runtime stage ##############
FROM lsiobase/ubuntu:bionic
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="saarg"
# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
RUN \
echo "**** install runtime packages ****" && \
apt-get update && \
apt-get install -y \
libccid \
libpcsclite1 \
libusb-1.0-0 \
pcscd \
udev && \
echo "**** install PCSC drivers ****" && \
mkdir -p \
/tmp/omnikey && \
@ -77,17 +71,15 @@ RUN \
/tmp/omnikey --strip-components=2 && \
cd /tmp/omnikey && \
./install && \
echo "**** fix group for card readers and add abc to dialout group ****" && \
groupmod -g 24 cron && \
groupmod -g 16 dialout && \
usermod -a -G 16 abc && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# copy local files
# copy buildstage and local files
COPY --from=buildstage /usr/bin/oscam /usr/bin/
COPY --from=buildstage /usr/bin/oscam.debug /usr/bin/
COPY root/ /
# Ports and volumes

View File

@ -100,6 +100,7 @@ The web interface is at port 8888.
## Versions
+ **03.01.18:** Deprecate cpu_core routine lack of scaling.
+ **13.12.17:** Rebase to alpine 3.7.
+ **19.10.17:** Add ccid package for usb card readers.
+ **17.10.17:** Switch to using bzr for source code, streamboard awol.