text:
FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS build-env
WORKDIR /app

COPY *.sln .
COPY Cynosura.Studio.Core/*.csproj ./Cynosura.Studio.Core/
COPY Cynosura.Studio.Data/*.csproj ./Cynosura.Studio.Data/
COPY Cynosura.Studio.Web/*.csproj ./Cynosura.Studio.Web/

RUN dotnet restore Cynosura.Studio.Web/Cynosura.Studio.Web.csproj

COPY Cynosura.Studio.Core/. ./Cynosura.Studio.Core/
COPY Cynosura.Studio.Data/. ./Cynosura.Studio.Data/
COPY Cynosura.Studio.Web/. ./Cynosura.Studio.Web/

RUN sed -i "s|c:\\\temp\\\Cynosura.Studio\\\|/my/logs/|g" Cynosura.Studio.Web/nlog.config
RUN sed -i "s|c:\\\temp\\\|/my/logs/|g" Cynosura.Studio.Web/nlog.config

RUN dotnet publish Cynosura.Studio.Web/Cynosura.Studio.Web.csproj -c Release -o ../out

FROM mcr.microsoft.com/dotnet/core/aspnet:2.1
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "Cynosura.Studio.Web.dll"]


text:
# AUTOGENERATED FILE
FROM balenalib/raspberrypi3-debian:stretch-run

ENV NODE_VERSION 12.22.7
ENV YARN_VERSION 1.22.4

RUN buildDeps='curl libatomic1' \
	&& set -x \
	&& for key in \
	6A010C5166006599AA17F08146C2130DFD2497F5 \
	; do \
		gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \
		gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \
		gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
	done \
	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
	&& rm -rf /var/lib/apt/lists/* \
	&& curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-armv7l.tar.gz" \
	&& echo "53cd2eeb5fbd41fa43620f06fe6340794498d434ac03894e7b4fd1633108775b  node-v$NODE_VERSION-linux-armv7l.tar.gz" | sha256sum -c - \
	&& tar -xzf "node-v$NODE_VERSION-linux-armv7l.tar.gz" -C /usr/local --strip-components=1 \
	&& rm "node-v$NODE_VERSION-linux-armv7l.tar.gz" \
	&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
	&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
	&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
	&& mkdir -p /opt/yarn \
	&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \
	&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
	&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \
	&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
	&& npm config set unsafe-perm true -g --unsafe-perm \
	&& rm -rf /tmp/*

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]

 RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@node.sh" \
  && echo "Running test-stack@node" \
  && chmod +x test-stack@node.sh \
  && bash test-stack@node.sh \
  && rm -rf test-stack@node.sh

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v7 \nOS: Debian Stretch \nVariant: run variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nNode.js v12.22.7, Yarn v1.22.4 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature  (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info

RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
	&& chmod +x /bin/sh-shim \
	&& cp /bin/sh /bin/sh.real \
	&& mv /bin/sh-shim /bin/sh

domain: dockerfile


text:
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

FROM rust:1

# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
# will be updated to match your local UID/GID (when using the dockerFile property).
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Configure apt and install packages
RUN apt-get update \
    && export DEBIAN_FRONTEND=noninteractive \
    && apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
    #
    # Verify git, needed tools installed
    && apt-get -y install git openssh-client less iproute2 procps lsb-release \
    #
    # Install lldb, vadimcn.vscode-lldb VSCode extension dependencies
    && apt-get install -y lldb python3-minimal libpython3.7 \
    #
    # Install application build dependencies
    && apt-get install -y clang libclang-dev libfreeipmi-dev llvm-dev \
    #
    # Install Rust components
    && rustup update 2>&1 \
    && rustup component add rls rust-analysis rust-src rustfmt clippy 2>&1 \
    #
    # Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
    && groupadd --gid $USER_GID $USERNAME \
    && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
    # [Optional] Add sudo support for the non-root user
    && apt-get install -y sudo \
    && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\
    && chmod 0440 /etc/sudoers.d/$USERNAME \
    #
    # Clean up
    && apt-get autoremove -y \
    && apt-get clean -y \
    && rm -rf /var/lib/apt/lists/*


text:
FROM minidocks/perl AS minimal
LABEL maintainer="Martin Hasoň <martin.hason@gmail.com>"

ARG version=2021

ENV PATH="$PATH:/usr/local/texlive/bin/x86_64-linuxmusl"

COPY rootfs /

RUN apk add xz && wget -O /tmp/install-tl-unx.tar.gz "http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${version}/install-tl-unx.tar.gz" \
    && tar -xvzf /tmp/install-tl-unx.tar.gz -C /tmp \
    && if [ "$version" = 2021 ]; then repository="http://ftp.cvut.cz/tex-archive/systems/texlive/tlnet/"; else repository="http://ftp.math.utah.edu/pub/texlive/historic/systems/texlive/$version/tlnet-final"; fi \
    && /tmp/*/install-tl --repository="$repository" --profile=/etc/texlive.profile --scheme=minimal && clean

FROM minimal AS basic

RUN tlmgr install scheme-basic latexmk pdfpages pdflscape ms pdfjam pdfcrop pdfbook2 && clean

FROM minimal AS context

RUN apk add fontconfig freetype libgcc && tlmgr install scheme-context && clean

FROM basic AS small

RUN apk add fontconfig freetype libgcc && tlmgr install scheme-small adjustbox background bidi csquotes collectbox everypage footmisc footnotebackref framed fvextra ly1 mdframed mweights needspace pagecolor sourcecodepro sourcesanspro titling xurl zref && clean

FROM small AS gregorio

RUN tlmgr install ctablestack luamplib xstring preprint libertine gregoriotex && clean

FROM small AS medium

RUN tlmgr install scheme-medium && clean

FROM medium AS full

RUN tlmgr install scheme-full && clean

FROM basic


text:
FROM scratch

# Core bundle labels.
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=falcon-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.8.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3

# Labels for testing.
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/

# Copy files to locations specified by labels.
COPY bundle/manifests /manifests/
COPY bundle/metadata /metadata/
COPY bundle/tests/scorecard /tests/scorecard/


text:
FROM ubuntu:20.04

# Disable interactive installation mode
ENV DEBIAN_FRONTEND=noninteractive

# Install Python and locales dependencies
RUN apt-get update && apt-get install -y \
    python3 \
    python3-dev \
    python3-pip \
    locales && \
    apt-get clean autoclean && apt-get autoremove -y

RUN pip3 install --upgrade pip setuptools wheel

# Copy local directories
COPY ./test /root/test
COPY ./setup /root/setup

# Install test report dependencies
RUN pip3 install --no-cache-dir -r /root/setup/requirements_report.txt

############## ONNX Backend dependencies ###########
ENV ONNX_BACKEND="onnxruntime.backend.backend"

# Set locale which is required for StringNormalizer
RUN locale-gen en_US.UTF-8 && update-locale LANG=en_US.UTF-8

RUN pip3 install onnx

# Install dependencies
RUN pip3 install onnxruntime
####################################################

CMD . /root/setup/docker-setup.sh && \
    pytest /root/test/test_backend.py --onnx_backend=${ONNX_BACKEND} -k 'not _cuda' -v


text:
FROM composer:2.0.12 AS composer

FROM php:8.0.3-apache AS shared
RUN apt-get update && apt-get install -y \
  busybox-static \
  libpq-dev \
  libzip-dev \
  locales \
  supervisor \
  unzip \
  && docker-php-ext-install \
  bcmath \
  pdo_mysql \
  pdo_pgsql \
  zip \
  && apt-get clean \
  && rm -rf /var/lib/apt/lists/*
RUN localedef -i ja_JP -c -f UTF-8 -A /usr/share/locale/locale.alias ja_JP.UTF-8
COPY ./docker-compose/php/my.ini /usr/local/etc/php/conf.d/
RUN a2enmod rewrite
ARG APACHE_DOCUMENT_ROOT=/var/www/html/laravel/public
ENV APACHE_DOCUMENT_ROOT ${APACHE_DOCUMENT_ROOT}
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
COPY ./docker-compose/php/001-my.conf /etc/apache2/sites-available/001-my.conf
RUN a2dissite 000-default \
  && a2ensite 001-my
ENV APP_ENV laravel
RUN mkdir -p /var/log/supervisor
COPY ./docker-compose/php/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY ./docker-compose/php/crontabs/root /var/spool/cron/crontabs/root
RUN ln -sf /dev/stdout /var/log/cron
CMD ["/usr/bin/supervisord"]

FROM shared AS develop
COPY --from=composer /usr/bin/composer /usr/bin/composer
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
  && apt-get update && apt-get install -y \
  git \
	nodejs \
  && apt-get clean \
  && rm -rf /var/lib/apt/lists/*

#FROM composer AS build_composer
#ENV APP_ENV laravel
#COPY --chown=www-data:www-data ./composer.json ./composer.lock ./
#RUN composer install --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress --no-suggest --no-interaction
#COPY --chown=www-data:www-data . .
#RUN composer dump-autoload \
#  && composer run-script post-root-package-install \
#  && composer run-script post-create-project-cmd
#
#FROM node:14.15.0 AS build_npm
#WORKDIR /app
#COPY ./package.json ./package-lock.json ./
#RUN npm install
#COPY . .
#RUN npm run production
#
#FROM shared AS server
#COPY --from=build_composer --chown=www-data:www-data ./app/ .
#RUN touch ./database/database.sqlite
#COPY --from=build_npm --chown=www-data:www-data ./app/public/css ./public/css
#COPY --from=build_npm --chown=www-data:www-data ./app/public/js ./public/js
#COPY --from=build_npm --chown=www-data:www-data ./app/public/mix-manifest.json ./public/mix-manifest.json


text:
# AUTOGENERATED FILE
FROM balenalib/artik533s-debian:stretch-run

# remove several traces of debian python
RUN apt-get purge -y python.*

# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8

# install python dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
		ca-certificates \
		netbase \
	&& rm -rf /var/lib/apt/lists/*

# key 63C7CC90: public key "Simon McVittie <smcv@pseudorandom.co.uk>" imported
# key 3372DCFA: public key "Donald Stufft (dstufft) <donald@stufft.io>" imported
RUN gpg --batch --keyserver keyring.debian.org --recv-keys 4DE8FF2A63C7CC90 \
	&& gpg --batch --keyserver keyserver.ubuntu.com --recv-key 6E3CBCE93372DCFA \
	&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 0x52a43a1e4b77b059

ENV PYTHON_VERSION 3.8.13

# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 22.1.2

ENV SETUPTOOLS_VERSION 62.4.0

RUN set -x \
	&& buildDeps=' \
		curl \
	' \
	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
	&& curl -SLO "http://resin-packages.s3.amazonaws.com/python/v$PYTHON_VERSION/Python-$PYTHON_VERSION.linux-armv7hf-libffi3.2.tar.gz" \
	&& echo "7dd458f54997a114c892f93cfa0a2e7a0f8dd81fae4815ae2a07e4781958f8eb  Python-$PYTHON_VERSION.linux-armv7hf-libffi3.2.tar.gz" | sha256sum -c - \
	&& tar -xzf "Python-$PYTHON_VERSION.linux-armv7hf-libffi3.2.tar.gz" --strip-components=1 \
	&& rm -rf "Python-$PYTHON_VERSION.linux-armv7hf-libffi3.2.tar.gz" \
	&& ldconfig \
	&& curl -SL "https://github.com/pypa/get-pip/raw/38e54e5de07c66e875c11a1ebbdb938854625dd8/public/get-pip.py" -o get-pip.py \
    && echo "e235c437e5c7d7524fbce3880ca39b917a73dc565e0c813465b7a7a329bb279a *get-pip.py" | sha256sum -c - \
    && python3 get-pip.py \
        --disable-pip-version-check \
        --no-cache-dir \
        --no-compile \
        "pip==$PYTHON_PIP_VERSION" \
        "setuptools==$SETUPTOOLS_VERSION" \
	&& rm -f get-pip.py \
	&& find /usr/local \
		\( -type d -a -name test -o -name tests \) \
		-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
		-exec rm -rf '{}' + \
	&& cd / \
	&& rm -rf /usr/src/python ~/.cache

# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \
	&& ln -sf pip3 pip \
	&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
	&& ln -sf idle3 idle \
	&& ln -sf pydoc3 pydoc \
	&& ln -sf python3 python \
	&& ln -sf python3-config python-config

# set PYTHONPATH to point to dist-packages
ENV PYTHONPATH /usr/lib/python3/dist-packages:$PYTHONPATH

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]

 RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@python.sh" \
  && echo "Running test-stack@python" \
  && chmod +x test-stack@python.sh \
  && bash test-stack@python.sh \
  && rm -rf test-stack@python.sh

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v7 \nOS: Debian Stretch \nVariant: run variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nPython v3.8.13, Pip v22.1.2, Setuptools v62.4.0 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature  (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info


text:
# Format: FROM    repository[:version]
FROM       ubuntu:latest

# Format: MAINTAINER Name <email@addr.ess>
MAINTAINER Yang Lei <yanglei@us.ibm.com>

# Installation:

# Update apt-get sources AND install NodeJS and npm
RUN apt-get update && apt-get install -y nodejs && apt-get install -y npm

# The real logic

ADD ./ /var/apps/ITOCair-nodejs

RUN \
  rm -fr /var/apps/ITOCair-nodejs/.git ;\
  cd /var/apps/ITOCair-nodejs ;\
  npm install;\
  chmod +x run.sh

WORKDIR /var/apps/ITOCair-nodejs

EXPOSE 9080 9443

ENV APP_NAME app.js

# Use the following to indicate authentication micro-service location: host:port
#ENV AUTH_SERVICE

# Use the following environment variable to define datasource location
#ENV MONGO_URL mongodb://localhost:27017/ITOCair
#ENV CLOUDANT_URL

CMD ["./run.sh"]


text:
# escape=`

ARG DOTNET_VERSION=5.0.1

# Installer image
FROM mcr.microsoft.com/windows/servercore:1809-amd64 AS installer
ARG DOTNET_VERSION

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

# Retrieve .NET Runtime
RUN Invoke-WebRequest -OutFile dotnet.zip https://dotnetcli.azureedge.net/dotnet/Runtime/$Env:DOTNET_VERSION/dotnet-runtime-$Env:DOTNET_VERSION-win-x64.zip; `
    $dotnet_sha512 = '036a6f07982349cdc2ffc305387916216707118b7372dbd701c7a58a3ca04fc2648ed1c15b2d101b2c2ae36f2f83da345301fea809d93acfc93e34c66f0bc788'; `
    if ((Get-FileHash dotnet.zip -Algorithm sha512).Hash -ne $dotnet_sha512) { `
        Write-Host 'CHECKSUM VERIFICATION FAILED!'; `
        exit 1; `
    }; `
    `
    mkdir dotnet; `
    tar -C dotnet -oxzf dotnet.zip; `
    Remove-Item -Force dotnet.zip

# Runtime image
FROM mcr.microsoft.com/windows/nanoserver:1809-amd64
ARG DOTNET_VERSION

ENV `
    # Configure web servers to bind to port 80 when present
    ASPNETCORE_URLS=http://+:80 `
    # Enable detection of running in a container
    DOTNET_RUNNING_IN_CONTAINER=true `
    DOTNET_VERSION=$DOTNET_VERSION

# In order to set system PATH, ContainerAdministrator must be used
USER ContainerAdministrator
RUN setx /M PATH "%PATH%;C:\Program Files\dotnet"
USER ContainerUser

COPY --from=installer ["/dotnet", "/Program Files/dotnet"]


text:
# AUTOGENERATED FILE
FROM balenalib/n510-tx2-ubuntu:impish-run

ENV GO_VERSION 1.15.15

# gcc for cgo
RUN apt-get update && apt-get install -y --no-install-recommends \
		g++ \
		gcc \
		libc6-dev \
		make \
		pkg-config \
		git \
	&& rm -rf /var/lib/apt/lists/*

RUN set -x \
	&& fetchDeps=' \
		curl \
	' \
	&& apt-get update && apt-get install -y $fetchDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
	&& mkdir -p /usr/local/go \
	&& curl -SLO "https://storage.googleapis.com/golang/go$GO_VERSION.linux-arm64.tar.gz" \
	&& echo "714abb01af210473dd6af331094ad6847162eff81a7fc7241d24f5a85496c9fa  go$GO_VERSION.linux-arm64.tar.gz" | sha256sum -c - \
	&& tar -xzf "go$GO_VERSION.linux-arm64.tar.gz" -C /usr/local/go --strip-components=1 \
	&& rm -f go$GO_VERSION.linux-arm64.tar.gz

ENV GOROOT /usr/local/go
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH

RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]

 RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/613d8e9ca8540f29a43fddf658db56a8d826fffe/scripts/assets/tests/test-stack@golang.sh" \
  && echo "Running test-stack@golang" \
  && chmod +x test-stack@golang.sh \
  && bash test-stack@golang.sh \
  && rm -rf test-stack@golang.sh

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v8 \nOS: Ubuntu impish \nVariant: run variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nGo v1.15.15 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature  (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info

RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
	&& chmod +x /bin/sh-shim \
	&& cp /bin/sh /bin/sh.real \
	&& mv /bin/sh-shim /bin/sh


text:
FROM alpine:latest

LABEL maintainer="Federico Pereira <fpereira@cnsoluciones.com>"

ENV TZ='America/Argentina/Buenos_Aires' \
	DOMAIN_OVPN='172.16.0.203' \
	EASYRSA_REQ_COUNTRY='AR' \
	EASYRSA_REQ_PROVINCE='Buenos Aires' \
	EASYRSA_REQ_CITY='La Plata' \
	EASYRSA_REQ_ORG='CNSoluciones' \
	EASYRSA_REQ_EMAIL='fpereira@cnsoluciones' \
	EASYRSA_REQ_OU='server'

RUN apk add --update --no-cache bash openssl tzdata expect easy-rsa \
	&& mkdir -p /keystore/ca && mkdir -p /keystore/client && mkdir -p /keystore/server \
	&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*

COPY ./run.sh /usr/sbin/create
COPY ./build-ca /usr/share/easy-rsa/build-ca
COPY ./gen-req /usr/share/easy-rsa/gen-req
COPY ./sign-req /usr/share/easy-rsa/sign-req

RUN chmod 777 /usr/sbin/create /usr/share/easy-rsa/build-ca /usr/share/easy-rsa/gen-req /usr/share/easy-rsa/sign-req
WORKDIR /usr/share/easy-rsa/


text:
FROM resin/zynq-xz702-fedora-buildpack-deps:latest

ENV GO_VERSION 1.10.3

RUN mkdir -p /usr/local/go \
	&& curl -SLO "http://resin-packages.s3.amazonaws.com/golang/v$GO_VERSION/go$GO_VERSION.linux-armv7hf.tar.gz" \
	&& echo "f12011d4c1485ecc958e0c4df93e50da166532a60afec8e01e8f52b9c864d5b5  go1.10.3.linux-armv7hf.tar.gz" | sha256sum -c - \
	&& tar -xzf "go$GO_VERSION.linux-armv7hf.tar.gz" -C /usr/local/go --strip-components=1 \
	&& rm -f go$GO_VERSION.linux-armv7hf.tar.gz

ENV GOROOT /usr/local/go
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH

RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH

COPY go-wrapper /usr/local/bin/

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: http://docs.resin.io/deployment/dockerfile"]


text:
# Use python:3.7-alpine as the base image
FROM python:3.7-alpine

# Specify your e-mail address as the maintainer of the container image
MAINTAINER Wen Wu "wwu@pdx.edu"

# Execute apk add and update
#RUN apk add --update --no-cache

# Copy the contents of the current directory into the container directory /app
COPY . /app

# Set the working directory of the container to /app
WORKDIR /app

# Install the Python packages specified by requirements.txt into the container
RUN pip install -r requirements.txt

# Set the program that is invoked upon container instantiation
#ENTRYPOINT ["python"]

# Set the parameters to the program
CMD gunicorn --bind :$PORT app:app


text:
FROM php:5.6-apache

MAINTAINER Grummfy me@grummfy.be

RUN mkdir -p /var/www/laravel-ci/bin && cd /var/www/laravel-ci

VOLUME ["/var/www/config", "/var/www/repositories"]

WORKDIR /var/www/laravel-ci

# init extension and requirements
RUN apt-get update && apt-get install -y zlib1g-dev git wget vim --no-install-recommends

COPY bin/* /var/www/laravel-ci/bin/

RUN bin/docker-php-pecl-install xdebug \
	&& docker-php-ext-install zip mbstring \
	&& echo "xdebug.remote_enable=1"       >> /usr/local/etc/php/conf.d/docker-php-pecl-xdebug.ini \
    && echo "xdebug.remote_port=9000"      >> /usr/local/etc/php/conf.d/docker-php-pecl-xdebug.ini \
    && echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/docker-php-pecl-xdebug.ini \
# move to accelerate the build part
    && mv /usr/local/etc/php/conf.d/docker-php-pecl-xdebug.ini /var/www/docker-php-pecl-xdebug.ini

# install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=bin --filename=composer
# install tools
RUN cd bin \
	&& wget https://phar.phpunit.de/phploc.phar \
	&& mv phploc.phar phploc \
	&& wget https://phar.phpunit.de/phpcpd.phar \
	&& mv phpcpd.phar phpcpd \
	&& wget http://downloads.atoum.org/nightly/mageekguy.atoum.phar \
	&& mv mageekguy.atoum.phar atoum \
	&& wget http://static.pdepend.org/php/latest/pdepend.phar \
	&& mv pdepend.phar pdepend \
	&& wget http://static.phpmd.org/php/latest/phpmd.phar \
	&& mv phpmd.phar phpmd \
	&& wget https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar \
	&& mv phpcs.phar phpcs \
	&& wget https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar \
	&& mv phpcbf.phar phpcbf \
	&& wget http://get.sensiolabs.org/php-cs-fixer.phar \
	&& mv php-cs-fixer.phar php-cs-fixer \
	&& wget https://www.phing.info/get/phing-latest.phar \
	&& mv phing-latest.phar phing \
	&& wget https://github.com/Behat/Behat/releases/download/v2.5.5/behat.phar \
	&& mv behat.phar behat \
	&& wget http://codeception.com/codecept.phar \
	&& mv codecept.phar codecept \
	&& wget https://github.com/Halleck45/PhpMetrics/raw/master/build/phpmetrics.phar \
	&& mv phpmetrics.phar phpmetrics \
	&& chmod +x *

# make bin files accessible globally
RUN mv bin/* /usr/local/bin/

# install project
RUN composer create-project --no-dev laravel/laravel ci 5.1 \
	&& cd ci \
	&& composer require --update-no-dev -o pragmarx/ci
# configure it
RUN awk '/App\\Providers\\RouteServiceProvider::class,/ { print; print "PragmaRX\\Ci\\Vendor\\Laravel\\ServiceProvider::class,"; next }1' ci/config/app.php > tmp \
	&& cat tmp > ci/config/app.php \
	&& sed -i "s/'log' => 'single'/'log' => 'syslog'/" ci/config/app.php
# make route available
RUN sed -i "s/return view('welcome');/return view('pragmarx\/ci::dashboard');/" ci/app/Http/routes.php

# be ugly and do dirty stuff to make things works ;)
RUN chmod -R 0777 /var/www/laravel-ci/ci/storage \
	&& chmod -R 0777 /var/www/laravel-ci/ci/bootstrap/cache

# restore xdebug
RUN mv /var/www/docker-php-pecl-xdebug.ini /usr/local/etc/php/conf.d/docker-php-pecl-xdebug.ini

# link apache repository and ci tools
RUN rm -r /var/www/html \
	&& ln -s /var/www/laravel-ci/ci/public /var/www/html

# cleanup
RUN rm -rf /tmp/pear && rm -rf /var/lib/apt/lists/* && rm -rf /usr/src/php

# get back to directory of apache
WORKDIR /var/www/html

CMD ["docker-php-ci-runner"]


text:
# AUTOGENERATED FILE
FROM balenalib/nitrogen6x-alpine:3.5-build

ENV GO_VERSION 1.11.2

# set up nsswitch.conf for Go's "netgo" implementation
# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf

RUN mkdir -p /usr/local/go \
	&& curl -SLO "http://resin-packages.s3.amazonaws.com/golang/v$GO_VERSION/go$GO_VERSION.linux-alpine-armhf.tar.gz" \
	&& echo "50ab067d49d12e77d9b259228b9f66393d7f5c05803e9215c424ee5b26aadb63  go$GO_VERSION.linux-alpine-armhf.tar.gz" | sha256sum -c - \
	&& tar -xzf "go$GO_VERSION.linux-alpine-armhf.tar.gz" -C /usr/local/go --strip-components=1 \
	&& rm -f go$GO_VERSION.linux-alpine-armhf.tar.gz

ENV GOROOT /usr/local/go
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH

RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]


text:
# AUTOGENERATED FILE
FROM balenalib/amd64-debian:buster-build

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        ca-certificates \
        curl \
        \
# .NET Core dependencies
        libc6 \
        libgcc1 \
        libgssapi-krb5-2 \
        libicu57 \
        liblttng-ust0 \
        libssl1.0.2 \
        libstdc++6 \
        zlib1g \
    && rm -rf /var/lib/apt/lists/*

# Configure web servers to bind to port 80 when present
ENV ASPNETCORE_URLS=http://+:80 \
    # Enable detection of running in a container
    DOTNET_RUNNING_IN_CONTAINER=true

# Install .NET Core
ENV DOTNET_VERSION 2.1.19

RUN curl -SL --output dotnet.tar.gz "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-x64.tar.gz" \
    && dotnet_sha512='862c5fb342ffd97fea3c3f98b2c665e744e32a1c8f94c8542ecbe577a65439898db0f2f6f5c13a0f066a554ef7e48c473ee83bac314a0fa8e2d7ad0af5ec1e4b' \
    && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \
    && 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

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]

 RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@dotnet.sh" \
  && echo "Running test-stack@dotnet" \
  && chmod +x test-stack@dotnet.sh \
  && bash test-stack@dotnet.sh \
  && rm -rf test-stack@dotnet.sh

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: Intel 64-bit (x86-64) \nOS: Debian Buster \nVariant: build variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \ndotnet 2.1-runtime \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature  (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info

RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
	&& chmod +x /bin/sh-shim \
	&& cp /bin/sh /bin/sh.real \
	&& mv /bin/sh-shim /bin/sh


text:
# AUTOGENERATED FILE
FROM resin/orangepi-plus2-fedora-buildpack-deps:25

ENV NODE_VERSION 4.9.1
ENV YARN_VERSION 1.6.0

RUN for key in \
	6A010C5166006599AA17F08146C2130DFD2497F5 \
	; do \
		gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
		gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \
		gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" ; \
	done \
	&& curl -SLO "http://resin-packages.s3.amazonaws.com/node/v$NODE_VERSION/node-v$NODE_VERSION-linux-armv7hf.tar.gz" \
	&& echo "de604aa93b77ade84145f383a36859b61706321164a2414d629731d0c6aa3206  node-v4.9.1-linux-armv7hf.tar.gz" | sha256sum -c - \
	&& tar -xzf "node-v$NODE_VERSION-linux-armv7hf.tar.gz" -C /usr/local --strip-components=1 \
	&& rm "node-v$NODE_VERSION-linux-armv7hf.tar.gz" \
	&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
	&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
	&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
	&& mkdir -p /opt/yarn \
	&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \
	&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
	&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \
	&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
	&& npm config set unsafe-perm true -g --unsafe-perm \
	&& rm -rf /tmp/*

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: http://docs.resin.io/deployment/dockerfile"]


text:
# AUTOGENERATED FILE
FROM balenalib/edge-alpine:3.16-build

ENV NODE_VERSION 18.3.0
ENV YARN_VERSION 1.22.4

# Install dependencies
RUN apk add --no-cache libgcc libstdc++ libuv \
	&& apk add --no-cache libssl1.0 || apk add --no-cache libssl1.1

RUN for key in \
	6A010C5166006599AA17F08146C2130DFD2497F5 \
	; do \
		gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
		gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \
		gpg --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
	done \
	&& curl -SLO "http://resin-packages.s3.amazonaws.com/node/v$NODE_VERSION/node-v$NODE_VERSION-linux-alpine-amd64.tar.gz" \
	&& echo "a3044ec61646e341a9845c69c529b5582b7e35a432566b3f8c102bb6ecd67318  node-v$NODE_VERSION-linux-alpine-amd64.tar.gz" | sha256sum -c - \
	&& tar -xzf "node-v$NODE_VERSION-linux-alpine-amd64.tar.gz" -C /usr/local --strip-components=1 \
	&& rm "node-v$NODE_VERSION-linux-alpine-amd64.tar.gz" \
	&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
	&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
	&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
	&& mkdir -p /opt/yarn \
	&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \
	&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
	&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \
	&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
	&& npm config set unsafe-perm true -g --unsafe-perm \
	&& rm -rf /tmp/*

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]

 RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@node.sh" \
  && echo "Running test-stack@node" \
  && chmod +x test-stack@node.sh \
  && bash test-stack@node.sh \
  && rm -rf test-stack@node.sh

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo $'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: Intel 64-bit (x86-64) \nOS: Alpine Linux 3.16 \nVariant: build variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nNode.js v18.3.0, Yarn v1.22.4 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature  (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info


text:
# Note, some docker commands taken from/inspired by the standard docker-stacks maintained
# by the Jupyter team: https://github.com/jupyter/docker-stacks/
# which are Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

FROM gigantum/python3-minimal:87c90e7834-2019-07-19
LABEL maintainer="Gigantum <support@gigantum.com>"

RUN apt-get update \
    && apt-get install -yq --no-install-recommends \
        # These are needed by some conda-installed packages, such as opencv
        # Note that since our R bases use apt, this gets taken care of
        # automatically there
        libxrender1 \
        libxext6 \
        libgl1-mesa-glx \
    && apt-get clean

# Install Python packages

# nodejs is for jupyter lab extensions below
# It's pinned to match python3-minimal, to avoid the need to rebuild extensions
RUN conda install --quiet --yes nodejs=12.13.0 && \
    conda install --quiet --yes \
        'blas=*=openblas' \
        'bokeh=1.4' \
        'cloudpickle=1.2' \
        'cython=0.29' \
        # This is a dependency of other packages - may as well list explicitly
        # Some not currently explicit, but maybe "data science" are fastcache and pyparsing
        'dask-core=2.9' \
        'dill=0.3' \
        'h5py=2.10' \
        'hdf5=1.10' \
        'ipywidgets=7.5' \
        'matplotlib=3.1' \
        # Another dependency made explicit
        'networkx=2.4' \
        'numba=0.46' \
        'numexpr=2.7' \
        'numpy=1.17' \
        'pandas=0.25' \
        'patsy=0.5' \
        'pillow=6.2' \
        'psutil=5.6' \
        # Another dependency made explicit
        'pywavelets=1.1' \
        # Another dependency made explicit
        'pyyaml=5.2' \
        'scikit-image=0.16' \
        'scikit-learn=0.22' \
        'scipy=1.3' \
        'seaborn=0.9' \
        'sqlalchemy=1.3' \
        'statsmodels=0.10' \
        'sympy=1.5' \
        'xarray=0.14' \
        'xlrd=1.2'  \
    && conda install --quiet --yes -c plotly 'plotly=4.4' 'plotly-orca=1.2' \
    # Note - we used to remove pyqt and qt since we are mostly browser-based, but the conda solver pulls it in as part
    # of any subsequent installation, so it's better to just leave it installed to save space and time
    && conda clean --all

# Set up additional widgets
RUN export NODE_OPTIONS=--max-old-space-size=4096 && \
    jupyter labextension install jupyterlab_bokeh --no-build && \
    jupyter labextension install @jupyterlab/geojson-extension --no-build && \
    # Activate ipywidgets extensions for JupyterLab
    jupyter labextension install @jupyter-widgets/jupyterlab-manager@1.1 --no-build && \
    jupyter labextension install plotlywidget@1.4.0 --no-build && \
    jupyter labextension install jupyterlab-plotly@1.4.0 --no-build && \
    # Build all of the above
    jupyter lab build && \
    # unset just in case
    unset NODE_OPTIONS && \
    # Activate ipywidgets for notebook server just in case
    jupyter nbextension enable --py widgetsnbextension --sys-prefix && \
    npm cache clean --force && \
    rm -rf $CONDA_DIR/share/jupyter/lab/staging && \
    rm -rf /root/.cache/yarn && \
    rm -rf /root/.node-gyp

# Import matplotlib the first time to build the font cache.
ENV XDG_CACHE_HOME /opt/matplotlib/.cache/
RUN MPLBACKEND=Agg python -c "import matplotlib.pyplot"


text:
# Start from golang base image
FROM golang:alpine as builder

# ENV GO111MODULE=on

# Add Maintainer info
LABEL maintainer="Murat Güngör <muratgungor.dev@gmail.com>"

# Install git.
# Git is required for fetching the dependencies.
RUN apk update && apk add --no-cache git

# Set the current working directory inside the container
WORKDIR /app

# Copy go mod and sum files
COPY go.mod go.sum ./

# Download all dependencies. Dependencies will be cached if the go.mod and the go.sum files are not changed
RUN go mod download

# Copy the source from the current directory to the working Directory inside the container
COPY . .

# Build the Go app
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main cmd/*.go

# Start a new stage from scratch
FROM alpine:latest
RUN apk --no-cache add ca-certificates

WORKDIR /root/

# Copy the Pre-built binary file from the previous stage. Observe we also copied the .env file
COPY --from=builder /app/main .
COPY --from=builder /app/.env .

# Expose port 8080 to the outside world
EXPOSE 8080

#Command to run the executable
CMD ["./main"]


text:
ARG BASE_GOLANG_BUSTER
ARG BASE_DEBIAN
FROM $BASE_GOLANG_BUSTER as artifact
WORKDIR /src/
COPY 001-io1-io2-expand-support.patch 002-volume-stats.patch /
RUN apt-get update && apt-get install -y --no-install-recommends git mercurial patch
RUN wget https://github.com/kubernetes-sigs/aws-ebs-csi-driver/archive/v0.7.1.tar.gz -O - | tar -xz --strip-components=1 -C /src/ && \
  patch -p1 < /001-io1-io2-expand-support.patch && \
  patch -p1 < /002-volume-stats.patch
RUN make bin/aws-ebs-csi-driver

# support every standard Linux disk/mount utility so that CSI components won't complain
FROM $BASE_DEBIAN
RUN apt-get update && apt-get install -y ca-certificates e2fsprogs mount xfsprogs udev
COPY --from=artifact /src/bin/aws-ebs-csi-driver /bin/aws-ebs-csi-driver
ENTRYPOINT [ "/bin/aws-ebs-csi-driver" ]


text:
# Run Chromium in a container
#
# docker run -it \
#	--net host \ # may as well YOLO
#	--cpuset-cpus 0 \ # control the cpu
#	--memory 512mb \ # max memory it can use
#	-v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
#	-e DISPLAY=unix$DISPLAY \
#	-v $HOME/Downloads:/home/chromium/Downloads \
#	-v $HOME/.config/chromium/:/data \ # if you want to save state
#	--security-opt seccomp=$HOME/chrome.json \
#	--device /dev/snd \ # so we have sound
#	-v /dev/shm:/dev/shm \
#	--name chromium \
#	jess/chromium
#
# You will want the custom seccomp profile:
# 	wget https://raw.githubusercontent.com/jfrazelle/dotfiles/master/etc/docker/seccomp/chrome.json -O ~/chrome.json

# Base docker image
FROM debian:stretch
LABEL maintainer "Jessie Frazelle <jess@linux.com>"

ADD https://dl.google.com/linux/direct/google-talkplugin_current_amd64.deb /src/google-talkplugin_current_amd64.deb

# Install Chromium
RUN apt-get update && apt-get install -y \
      chromium \
      chromium-l10n \
      fonts-liberation \
      fonts-roboto \
      hicolor-icon-theme \
      libcanberra-gtk-module \
      libexif-dev \
      libgl1-mesa-dri \
      libgl1-mesa-glx \
      libpango1.0-0 \
      libv4l-0 \
      fonts-symbola \
      --no-install-recommends \
    && rm -rf /var/lib/apt/lists/* \
    && mkdir -p /etc/chromium.d/ \
    && /bin/echo -e 'export GOOGLE_API_KEY="AIzaSyCkfPOPZXDKNn8hhgu3JrA62wIgC93d44k"\nexport GOOGLE_DEFAULT_CLIENT_ID="811574891467.apps.googleusercontent.com"\nexport GOOGLE_DEFAULT_CLIENT_SECRET="kdloedMFGdGla2P1zacGjAQh"' > /etc/chromium.d/googleapikeys \
    && dpkg -i '/src/google-talkplugin_current_amd64.deb'

# Add chromium user
RUN groupadd -r chromium && useradd -r -g chromium -G audio,video chromium \
    && mkdir -p /home/chromium/Downloads && chown -R chromium:chromium /home/chromium

# Run as non privileged user
USER chromium

ENTRYPOINT [ "/usr/bin/chromium" ]
CMD [ "--user-data-dir=/data" ]


text:
ARG BSPINPUT_TAG
FROM ${BSPINPUT_TAG}
LABEL maintainer="Johannes Lode (at) dynainstruments.com"
ARG MERGE_JOBS

# put some use flags and accept keywords in
COPY bsp-config-files/ /usr/${TARGET}/

# triggerhappy, screen and nfs-utils will fail
RUN mv /var/lib/layman /var/db/repos/layman && \
    ln -sfT /usr/${TARGET}/etc/layman/layman.cfg /etc/layman/layman.cfg && \
    ln -sfT /usr/${TARGET}/etc/portage/repos.conf/layman.conf /etc/portage/repos.conf/layman.conf && \
    layman -f && \
    layman -a salfter kaa booboo && \
    ${TARGET}-emerge --root=/usr/${TARGET} --fetchonly -uDN --noreplace @embedded-minimal-root @embedded-fs-utils @embedded-libs-tools; \
    ${TARGET}-emerge ${MERGE_JOBS} --root=/usr/${TARGET} -uDN --noreplace --keep-going @embedded-minimal-root @embedded-fs-utils @embedded-libs-tools; \
    echo YES | etc-update --automode -9 && \
    true

CMD /bin/bash -il


text:
# AUTOGENERATED FILE
FROM balenalib/n510-tx2-alpine:edge-build

# remove several traces of python
RUN apk del python*

# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8

# key 63C7CC90: public key "Simon McVittie <smcv@pseudorandom.co.uk>" imported
# key 3372DCFA: public key "Donald Stufft (dstufft) <donald@stufft.io>" imported
RUN gpg --keyserver keyring.debian.org --recv-keys 4DE8FF2A63C7CC90 \
	&& gpg --keyserver keyserver.ubuntu.com --recv-key 6E3CBCE93372DCFA \
	&& gpg --keyserver keyserver.ubuntu.com --recv-keys 0x52a43a1e4b77b059

# point Python at a system-provided certificate database. Otherwise, we might hit CERTIFICATE_VERIFY_FAILED.
# https://www.python.org/dev/peps/pep-0476/#trust-database
ENV SSL_CERT_FILE /etc/ssl/certs/ca-certificates.crt

ENV PYTHON_VERSION 3.6.15

# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 22.1.2

ENV SETUPTOOLS_VERSION 62.4.0

RUN set -x \
	&& curl -SLO "http://resin-packages.s3.amazonaws.com/python/v$PYTHON_VERSION/Python-$PYTHON_VERSION.linux-alpine-aarch64-libffi3.3.tar.gz" \
	&& echo "5b27dad8387ca41d1bafb93fc6f90ad0c4bca7f252cee4804713a9144ac6aebb  Python-$PYTHON_VERSION.linux-alpine-aarch64-libffi3.3.tar.gz" | sha256sum -c - \
	&& tar -xzf "Python-$PYTHON_VERSION.linux-alpine-aarch64-libffi3.3.tar.gz" --strip-components=1 \
	&& rm -rf "Python-$PYTHON_VERSION.linux-alpine-aarch64-libffi3.3.tar.gz" \
	&& curl -SL "https://github.com/pypa/get-pip/raw/38e54e5de07c66e875c11a1ebbdb938854625dd8/public/get-pip.py" -o get-pip.py \
    && echo "e235c437e5c7d7524fbce3880ca39b917a73dc565e0c813465b7a7a329bb279a *get-pip.py" | sha256sum -c - \
    && python3 get-pip.py \
        --disable-pip-version-check \
        --no-cache-dir \
        --no-compile \
        "pip==$PYTHON_PIP_VERSION" \
        "setuptools==$SETUPTOOLS_VERSION" \
	&& rm -f get-pip.py \
	&& find /usr/local \
		\( -type d -a -name test -o -name tests \) \
		-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
		-exec rm -rf '{}' + \
	&& cd / \
	&& rm -rf /usr/src/python ~/.cache

# install "virtualenv", since the vast majority of users of this image will want it
RUN pip3 install --no-cache-dir virtualenv

ENV PYTHON_DBUS_VERSION 1.2.18

# install dbus-python dependencies
RUN apk add --no-cache \
		dbus-dev \
		dbus-glib-dev

# install dbus-python
RUN set -x \
	&& mkdir -p /usr/src/dbus-python \
	&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz" -o dbus-python.tar.gz \
	&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz.asc" -o dbus-python.tar.gz.asc \
	&& gpg --verify dbus-python.tar.gz.asc \
	&& tar -xzC /usr/src/dbus-python --strip-components=1 -f dbus-python.tar.gz \
	&& rm dbus-python.tar.gz* \
	&& cd /usr/src/dbus-python \
	&& PYTHON_VERSION=$(expr match "$PYTHON_VERSION" '\([0-9]*\.[0-9]*\)') ./configure \
	&& make -j$(nproc) \
	&& make install -j$(nproc) \
	&& cd / \
	&& rm -rf /usr/src/dbus-python

# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \
	&& ln -sf pip3 pip \
	&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
	&& ln -sf idle3 idle \
	&& ln -sf pydoc3 pydoc \
	&& ln -sf python3 python \
	&& ln -sf python3-config python-config

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]

 RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@python.sh" \
  && echo "Running test-stack@python" \
  && chmod +x test-stack@python.sh \
  && bash test-stack@python.sh \
  && rm -rf test-stack@python.sh

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo $'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v8 \nOS: Alpine Linux edge \nVariant: build variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nPython v3.6.15, Pip v22.1.2, Setuptools v62.4.0 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature  (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info


text:
FROM ubuntu:16.04

MAINTAINER The Analytics-Zoo Authors https://github.com/intel-analytics/analytics-zoo

WORKDIR /opt/work

ENV JAVA_7_HOME         /opt/work/jdk7
ENV JAVA_8_HOME         /opt/work/jdk8
ENV JAVA_HOME           ${JAVA_8_HOME}
ENV SCALA_HOME          /opt/work/scala
ENV CONDA_HOME          /opt/work/conda
ENV JENKINS_HOME        /opt/work/jenkins
ENV SPARK_2_1_HOME      /opt/work/spark-2.1.3
ENV SPARK_2_2_HOME      /opt/work/spark-2.2.2
ENV SPARK_2_3_HOME      /opt/work/spark-2.3.2
ENV SPARK_2_4_HOME      /opt/work/spark-2.4.0
ENV PATH                $SCALA_HOME/bin:${JAVA_HOME}/bin:${CONDA_HOME}/bin:${PATH}
ENV TORCH_VERSION       d03a42834bb1b674495b0c42de1716b66cc388f1
ENV TORCH_HOME		/opt/work/torch
ENV CAFFE_HOME      	/opt/work/caffe
ENV PATH                ${TORCH_HOME}/install/bin:${JAVA_HOME}/bin:${CONDA_HOME}/bin:${PATH}
ENV LANG                en_US.UTF-8
ENV LC_ALL              en_US.UTF-8

ADD ./run-slave.sh      /opt/work/jenkins/run-slave.sh
ADD ./slave.groovy      /opt/work/jenkins/slave.groovy

RUN apt-get update --fix-missing && \
    apt-get install -y vim curl nano wget unzip maven git bzip2 && \
    apt-get install -y locales && locale-gen en_US.UTF-8 && \
    apt-get install -y build-essential && \
    apt-get install -y protobuf-compiler libprotoc-dev && \
    apt-get install -y libgtk2.0-dev

#jdk8
RUN wget https://build.funtoo.org/distfiles/oracle-java/jdk-8u152-linux-x64.tar.gz && \
    gunzip jdk-8u152-linux-x64.tar.gz && \
    tar -xf jdk-8u152-linux-x64.tar -C /opt && \
    rm jdk-8u152-linux-x64.tar && \
    ln -s /opt/jdk1.8.0_152 ${JAVA_8_HOME} && \
#jdk7
    wget https://build.funtoo.org/distfiles/oracle-java/jdk-7u80-linux-x64.tar.gz && \
    gunzip jdk-7u80-linux-x64.tar.gz && \
    tar -xf jdk-7u80-linux-x64.tar -C /opt && \
    rm jdk-7u80-linux-x64.tar && \
    ln -s /opt/jdk1.7.0_80 ${JAVA_7_HOME} && \
#scala
    wget https://downloads.lightbend.com/scala/2.11.8/scala-2.11.8.tgz && \
    gunzip scala-2.11.8.tgz && \
    tar -xf scala-2.11.8.tar -C /opt && \
    rm scala-2.11.8.tar && \
    ln -s /opt/scala-2.11.8 ${SCALA_HOME} && \
#Jenkins
    chmod a+x /opt/work/jenkins/run-slave.sh && \
    chmod a+x /opt/work/jenkins/slave.groovy && \
    wget http://repo.jenkins-ci.org/releases/org/jenkins-ci/main/remoting/3.14/remoting-3.14.jar && \
    mv remoting-3.14.jar ${JENKINS_HOME} && \
#spark 2.1.3 2.2.2 2.3.2 2.4.0
    wget http://archive.apache.org/dist/spark/spark-2.1.3/spark-2.1.3-bin-hadoop2.7.tgz && \
    tar -xf spark-2.1.3-bin-hadoop2.7.tgz -C /opt/work && \
    rm spark-2.1.3-bin-hadoop2.7.tgz && \
    ln -s /opt/work/spark-2.1.3-bin-hadoop2.7 ${SPARK_2_1_HOME} && \
    wget http://archive.apache.org/dist/spark/spark-2.2.2/spark-2.2.2-bin-hadoop2.7.tgz && \
    tar -xf spark-2.2.2-bin-hadoop2.7.tgz -C /opt/work && \
    rm spark-2.2.2-bin-hadoop2.7.tgz && \
    ln -s /opt/work/spark-2.2.2-bin-hadoop2.7 ${SPARK_2_2_HOME} && \
    wget http://archive.apache.org/dist/spark/spark-2.3.2/spark-2.3.2-bin-hadoop2.7.tgz && \
    tar -xf spark-2.3.2-bin-hadoop2.7.tgz -C /opt/work && \
    rm spark-2.3.2-bin-hadoop2.7.tgz && \
    ln -s /opt/work/spark-2.3.2-bin-hadoop2.7 ${SPARK_2_3_HOME} && \
    wget http://archive.apache.org/dist/spark/spark-2.4.0/spark-2.4.0-bin-hadoop2.7.tgz && \
    tar -xf spark-2.4.0-bin-hadoop2.7.tgz -C /opt/work && \
    rm spark-2.4.0-bin-hadoop2.7.tgz && \
    ln -s /opt/work/spark-2.4.0-bin-hadoop2.7 ${SPARK_2_4_HOME} && \
#cmake
    wget https://cmake.org/files/v3.12/cmake-3.12.1.tar.gz && \
    tar xf cmake-3.12.1.tar.gz && \
    cd cmake-3.12.1 && \
    ./configure && \
    make -j16 && \
    make install && \
    cd .. && \
#python-conda
    wget https://repo.continuum.io/miniconda/Miniconda3-4.3.31-Linux-x86_64.sh && \
    /bin/bash Miniconda3-4.3.31-Linux-x86_64.sh -f -b -p ${CONDA_HOME} && \
    rm Miniconda3-4.3.31-Linux-x86_64.sh && \
    conda config --system --prepend channels conda-forge && \
    conda config --system --set auto_update_conda false && \
    conda config --system --set show_channel_urls true && \
    conda update --all --quiet --yes && \
    conda clean -tipsy

#TENSORFLOW MODELS
ENV PYTHONPATH /opt/work/models/research/slim:${PYTHONPATH}
RUN git clone https://github.com/tensorflow/models.git

#keras=1.2.2
RUN export TENSOR_FLOW_VERION=1.10.0 && \
    export KERAS_VERSION=1.2.2 && \
#py27
    conda create -y -n py27 python=2.7 && \
    conda install -y -n py27 -c conda-forge \
        mkdocs==1.0.4 scipy==1.2.1 pandas==0.24.2 scikit-learn==0.20.3 \
        matplotlib==2.2.3 seaborn==0.9.0 jupyter==1.0.0 plotly==3.9.0 \
        nltk==3.2.5 twine==1.13.0 pytest==4.5.0 pytest-xdist==1.28.0 \
        h5py==2.9.0 moviepy==0.2.3.5 scikit-image==0.14.3 \
        typing==3.6.6 numpy==1.16.3 pyyaml==5.1 \
        mkl==2019.3 mkl-include==2019.3 mkl-service==1.1.2 setuptools==41.0.1 \
        cmake==3.14.3 cffi==1.12.3 robotframework==3.1.1 requests==2.21.0 \
        networkx==2.2 tensorboard==1.10.0 libprotobuf==3.7.1 protobuf==3.7.1 \
        tensorflow==$TENSOR_FLOW_VERION keras==$KERAS_VERSION&& \
    conda install -y -n py27 --channel https://conda.anaconda.org/menpo opencv3==3.1.0 && \
    conda install -y -n py27 -c mingfeima mkldnn==0.16.1 && \
    conda install -y -n py27 -c pytorch pytorch-cpu==1.0.0 torchvision-cpu==0.2.1 && \
    /bin/bash -c "source activate py27 && pip install onnx==1.3.0 && source deactivate" && \
#py35
    conda create -y -n py35 python=3.5 && \
    conda install -y -n py35 -c conda-forge \
        mkdocs==1.0.4 scipy==1.1.0 pandas==0.23.4 scikit-learn==0.20.0 \
        matplotlib==3.0.0 seaborn==0.9.0 jupyter==1.0.0 plotly==3.9.0 \
        nltk==3.2.5 twine==1.13.0 pytest==3.8.1 pytest-xdist==1.27.0 \
        h5py==2.8.0 moviepy==0.2.3.5 imageio-ffmpeg==0.3.0 \
        typing==3.6.6 numpy==1.15.2 pyyaml==3.13 \
        mkl==2019.3 mkl-include==2019.3 mkl-service==1.1.2 setuptools==40.4.3 \
        cmake==3.14.3 cffi==1.11.5 robotframework==3.1.1 requests==2.19.1 \
        networkx==2.2 tensorboard==1.10.0 libprotobuf==3.6.0 protobuf==3.6.0 \
        tensorflow==$TENSOR_FLOW_VERION keras==$KERAS_VERSION && \
    conda install -y -n py35 -c anaconda protobuf==3.6.0 && \
    conda install -y -n py35 --channel https://conda.anaconda.org/menpo opencv3==3.1.0 && \
    conda install -y -n py35 -c mingfeima mkldnn==0.16.1 && \
    conda install -y -n py35 -c pytorch pytorch-cpu==1.0.0 torchvision-cpu==0.2.1 && \
    /bin/bash -c "source activate py35 && pip install onnx==1.3.0 && \
        pip install ray==0.7.0 && \
        pip install conda-pack==0.3.1 && \
        pip install psutil==5.6.2 && \
        pip install aiohttp==3.5.4 && \
        pip install setproctitle==1.1.10 && \
        source deactivate" && \
#py36
    conda create -y -n py36 python=3.6 && \
    conda install -y -n py36 -c conda-forge \
        mkdocs==1.0.4 scipy==1.2.1 pandas==0.24.2 scikit-learn==0.20.3 \
        matplotlib==3.0.3 seaborn==0.9.0 jupyter==1.0.0  plotly==3.9.0 \
        nltk==3.2.5 twine==1.13.0 pytest==4.5.0 pytest-xdist==1.28.0 \
        h5py==2.9.0 moviepy==0.2.3.5 imageio-ffmpeg==0.3.0 \
        typing==3.6.4 numpy==1.16.3 pyyaml==5.1 \
        mkl==2019.3 mkl-include==2019.3 mkl-service==1.1.2 setuptools==41.0.1 \
        cmake==3.14.3 cffi==1.12.3 robotframework==3.1.1 requests==2.21.0 \
        networkx==2.2 tensorboard==1.10.0 libprotobuf==3.7.1 protobuf==3.7.1 \
        tensorflow==$TENSOR_FLOW_VERION keras==$KERAS_VERSION && \
    conda install -y -n py36 -c anaconda protobuf==3.7.1 && \
    conda install -y -n py36 --channel https://conda.anaconda.org/menpo opencv3==3.1.0 && \
    conda install -y -n py36 -c mingfeima mkldnn==0.16.1 && \
    conda install -y -n py36 -c pytorch pytorch-cpu==1.0.0 torchvision-cpu==0.2.1 && \
    /bin/bash -c "source activate py36 && pip install onnx==1.3.0 && \
        pip install ray==0.7.0 && \
        pip install conda-pack==0.3.1 && \
        pip install psutil==5.6.2 && \
        pip install aiohttp==3.5.4 && \
        pip install setproctitle==1.1.10 && \
        source deactivate" && \
#keras=2.1.6
    export TENSOR_FLOW_VERION=1.10.0 && \
    export KERAS_VERSION=2.1.6 && \
#py27k216
    conda create -y -n py27k216 python=2.7 mkdocs==1.0.4 scipy==1.2.1 pandas==0.24.2 scikit-learn==0.20.3 matplotlib==2.2.3 seaborn==0.9.0 jupyter==1.0.0 && \
    conda install -y -n py27k216 plotly==3.9.0 nltk==3.2.5 twine==1.13.0 pytest==4.5.0 pytest-xdist==1.28.0 h5py==2.8.0 moviepy==0.2.3.5 && \
    conda install -y -n py27k216 -c conda-forge tensorflow==$TENSOR_FLOW_VERION keras==$KERAS_VERSION && \
    conda install -y -n py27k216 -c conda-forge opencv==3.4.1 && \
    conda install -y -n py27k216 typing==3.6.6 protobuf==3.7.1 numpy==1.16.3 pyyaml==5.1 mkl==2019.3 mkl-include==2019.3 setuptools==41.0.1 cmake==3.14.3 cffi==1.12.3 && \
    conda install -y -n py27k216 -c mingfeima mkldnn==0.16.1 && \
    conda install -y -n py27k216 -c conda-forge robotframework==3.1.1 requests==2.21.0 && \
#py35k216
    conda create -y -n py35k216 python=3.5 mkdocs==1.0.4 scipy==1.1.0 pandas==0.23.4 scikit-learn==0.20.0 matplotlib==2.2.2 seaborn==0.9.0 jupyter==1.0.0 && \
    conda install -y -n py35k216 plotly==3.9.0 nltk==3.2.5 twine==1.13.0 pytest==3.8.1 pytest-xdist==1.27.0 h5py==2.8.0 moviepy==0.2.3.5 && \
    conda install -y -n py35k216 -c conda-forge tensorflow==$TENSOR_FLOW_VERION keras==$KERAS_VERSION && \
    conda install -y -n py35k216 -c conda-forge opencv==3.4.1 && \
    conda install -y -n py35k216 typing==3.6.6 protobuf==3.6.0 numpy==1.15.2 pyyaml==3.13 mkl==2019.3 mkl-include==2019.3 setuptools==40.4.3 cmake==3.14.3 cffi==1.11.5 && \
    conda install -y -n py35k216 -c mingfeima mkldnn==0.16.1 && \
    conda install -y -n py35k216 -c conda-forge robotframework==3.1.1 requests==2.19.1 && \
#py36k216
    conda create -y -n py36k216 python=3.6 mkdocs==1.0.4 scipy==1.2.1 pandas==0.24.2 scikit-learn==0.20.3 matplotlib==3.0.3 seaborn==0.9.0 jupyter==1.0.0 && \
    conda install -y -n py36k216 plotly==3.9.0 nltk==3.2.5 twine==1.13.0 pytest==4.5.0 pytest-xdist==1.28.0 h5py==2.8.0 moviepy==0.2.3.5 && \
    conda install -y -n py36k216 -c conda-forge tensorflow==$TENSOR_FLOW_VERION keras==$KERAS_VERSION && \
    conda install -y -n py36k216 -c conda-forge opencv==3.4.1 && \
    conda install -y -n py36k216 typing==3.6.4 protobuf==3.7.1 numpy==1.16.3 pyyaml==5.1 mkl==2019.3 mkl-include==2019.3 setuptools==41.0.1 cmake==3.14.3 cffi==1.12.3 && \
    conda install -y -n py36k216 -c mingfeima mkldnn==0.16.1 && \
    conda install -y -n py36k216 -c conda-forge robotframework==3.1.1 requests==2.21.0

#torch
RUN git clone https://github.com/torch/distro.git /opt/work/torch --recursive && \
    cd /opt/work/torch && git checkout ${TORCH_VERSION} && \
    echo "Acquire::http::Proxy \"${http_proxy}\";\nAcquire::https::Proxy \"${https_proxy}\";" > /etc/apt/apt.conf && \
    export CMAKE_INCLUDE_PATH=/opt/intel/mkl/include && \
    export CMAKE_LIBRARY_PATH=/opt/intel/mkl/lib/intel64:/opt/intel/mkl/compiler/lib/intel64 && \
    export LD_LIBRARY_PATH=$CMAKE_LIBRARY_PATH:$LD_LIBRARY_PATH && \
    sed -i "s/sudo/ /g" install-deps && \
    ./install-deps && \
    yes | ./install.sh && \
    cd /opt/work/

#torch-rnn
RUN git config --global url.https://github.com/.insteadOf git://github.com/ && \
    cat ~/.gitconfig && \
    /opt/work/torch/install/bin/luarocks install torchx && \
    git clone https://github.com/Element-Research/dpnn.git && \
    cd dpnn && \
    git reset --hard ca0e99fa6d0dfd971f0f284520562765ae0865fd && \
    luarocks make rocks/dpnn-scm-1.rockspec && \
    cd /opt/work && \
    git clone https://github.com/Element-Research/rnn.git && \
    cd rnn && \
    luarocks make rocks/rnn-scm-1.rockspec && \
    cd /opt/work

#Caffe prepare
RUN apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler && \
    apt-get install -y libopencv-dev libopencv-contrib-dev && \
    apt-get install -y --no-install-recommends libboost-all-dev && \
    apt-get install -y libatlas-base-dev && \
    apt-get install -y python-dev python-pip gfortran-7 && \
    apt-get install -y libgflags-dev libgoogle-glog-dev liblmdb-dev && \
    apt-get install -y --no-install-recommends build-essential tcl tk gettext autoconf zlib1g-dev gcc && \
    apt-get install -y --no-install-recommends python-dev python3-dev libcurl4-openssl-dev

#Caffe
RUN git clone https://github.com/BVLC/caffe.git && \
    cd /opt/work/caffe && \
    cp /opt/work/caffe/Makefile.config.example Makefile.config && \
    echo "CPU_ONLY := 1" >> Makefile.config && \
    export ANACONDA_HOME=/opt/work/conda/envs/py27 && \
    sed -i '71s/^[^#]/#&/' Makefile.config && \
    sed -i '76s/^#//' Makefile.config && \
    sed -i 's/# $(ANA/$(ANA/g' Makefile.config && \
    sed -i '86s/^[^#]/#&/' Makefile.config && \
    sed -i '87s/^#//' Makefile.config && \
    sed -i 's/LIBRARIES += opencv_core opencv_highgui opencv_imgproc/LIBRARIES += opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs/g' Makefile && \
    apt-get install -y software-properties-common && \
    add-apt-repository ppa:ubuntu-toolchain-r/test && \
    apt update && \
    apt install g++-7 -y && \
    update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
                         --slave /usr/bin/g++ g++ /usr/bin/g++-7 && \
    update-alternatives --config gcc && \
    /bin/bash -c "source activate py27 && \
        easy_install -U pytest && \
        pip install -r /opt/work/caffe/python/requirements.txt && \
        ln -s /opt/work/conda/envs/py27/lib/python2.7 /usr/local/include/python2.7 && \
        ln -s /opt/work/conda/envs/py27/lib/python2.7/site-packages/numpy/core/include/numpy /usr/local/include/python2.7/numpy && \
        make all -j4 && make pycaffe && make distribute && \
        make test && \
        cd /opt/work && \
        export PYTHONPATH=${CAFFE_HOME}/python:${CAFFE_HOME}/distribute/python:${PYTHONPATH} && \
        ln /dev/null /dev/raw1394 && \
        source deactivate"

CMD ["/opt/work/jenkins/run-slave.sh"]


text:
# AUTOGENERATED FILE
FROM balenalib/colibri-imx6-ubuntu:impish-run

ENV GO_VERSION 1.17.11

# gcc for cgo
RUN apt-get update && apt-get install -y --no-install-recommends \
		g++ \
		gcc \
		libc6-dev \
		make \
		pkg-config \
		git \
	&& rm -rf /var/lib/apt/lists/*

RUN set -x \
	&& fetchDeps=' \
		curl \
	' \
	&& apt-get update && apt-get install -y $fetchDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
	&& mkdir -p /usr/local/go \
	&& curl -SLO "http://resin-packages.s3.amazonaws.com/golang/v$GO_VERSION/go$GO_VERSION.linux-armv7hf.tar.gz" \
	&& echo "15f75f2ea1e2eabf30ec1f6de92907923fb531df6f6568e8f84cec5f5f5c9e8d  go$GO_VERSION.linux-armv7hf.tar.gz" | sha256sum -c - \
	&& tar -xzf "go$GO_VERSION.linux-armv7hf.tar.gz" -C /usr/local/go --strip-components=1 \
	&& rm -f go$GO_VERSION.linux-armv7hf.tar.gz

ENV GOROOT /usr/local/go
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH

RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]

 RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/613d8e9ca8540f29a43fddf658db56a8d826fffe/scripts/assets/tests/test-stack@golang.sh" \
  && echo "Running test-stack@golang" \
  && chmod +x test-stack@golang.sh \
  && bash test-stack@golang.sh \
  && rm -rf test-stack@golang.sh

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v7 \nOS: Ubuntu impish \nVariant: run variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nGo v1.17.11 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature  (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info


text:
# vim:ft=Dockerfile
# Same as travis-base.Dockerfile, but without the test suite dependencies since
# we only build Debian packages on i386, we don’t run the tests.
FROM i386/debian:sid

RUN echo force-unsafe-io > /etc/dpkg/dpkg.cfg.d/docker-apt-speedup
# Paper over occasional network flakiness of some mirrors.
RUN echo 'APT::Acquire::Retries "5";' > /etc/apt/apt.conf.d/80retry

# NOTE: I tried exclusively using gce_debian_mirror.storage.googleapis.com
# instead of httpredir.debian.org, but the results (Fetched 123 MB in 36s (3357
# kB/s)) are not any better than httpredir.debian.org (Fetched 123 MB in 34s
# (3608 kB/s)). Hence, let’s stick with httpredir.debian.org (default) for now.

# Install mk-build-deps (for installing the i3 build dependencies),
# clang and clang-format-3.5 (for checking formatting and building with clang),
# lintian (for checking spelling errors),
RUN linux32 apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
    dpkg-dev devscripts git equivs \
    clang clang-format-3.5 \
    lintian && \
    rm -rf /var/lib/apt/lists/*

# Install i3 build dependencies.
COPY debian/control /usr/src/i3-debian-packaging/control
RUN linux32 apt-get update && \
    DEBIAN_FRONTEND=noninteractive mk-build-deps --install --remove --tool 'apt-get --no-install-recommends -y' /usr/src/i3-debian-packaging/control && \
    rm -rf /var/lib/apt/lists/*


text:
# AUTOGENERATED FILE
FROM balenalib/asus-tinker-board-debian:bullseye-build

# remove several traces of debian python
RUN apt-get purge -y python.*

# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8

# key 63C7CC90: public key "Simon McVittie <smcv@pseudorandom.co.uk>" imported
# key 3372DCFA: public key "Donald Stufft (dstufft) <donald@stufft.io>" imported
RUN gpg --batch --keyserver keyring.debian.org --recv-keys 4DE8FF2A63C7CC90 \
	&& gpg --batch --keyserver keyserver.ubuntu.com --recv-key 6E3CBCE93372DCFA \
	&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 0x52a43a1e4b77b059

ENV PYTHON_VERSION 3.8.5

# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 20.1.1

ENV SETUPTOOLS_VERSION 49.1.0

RUN set -x \
	&& curl -SLO "http://resin-packages.s3.amazonaws.com/python/v$PYTHON_VERSION/Python-$PYTHON_VERSION.linux-armv7hf-openssl1.1.tar.gz" \
	&& echo "89cbc6643c12f6cbed44a89472fa7dac118a0e952fc7ed705ce2151a96c9ab8e  Python-$PYTHON_VERSION.linux-armv7hf-openssl1.1.tar.gz" | sha256sum -c - \
	&& tar -xzf "Python-$PYTHON_VERSION.linux-armv7hf-openssl1.1.tar.gz" --strip-components=1 \
	&& rm -rf "Python-$PYTHON_VERSION.linux-armv7hf-openssl1.1.tar.gz" \
	&& ldconfig \
	&& if [ ! -e /usr/local/bin/pip3 ]; then : \
		&& curl -SLO "https://raw.githubusercontent.com/pypa/get-pip/430ba37776ae2ad89f794c7a43b90dc23bac334c/get-pip.py" \
		&& echo "19dae841a150c86e2a09d475b5eb0602861f2a5b7761ec268049a662dbd2bd0c  get-pip.py" | sha256sum -c - \
		&& python3 get-pip.py \
		&& rm get-pip.py \
	; fi \
	&& pip3 install --no-cache-dir --upgrade --force-reinstall pip=="$PYTHON_PIP_VERSION" setuptools=="$SETUPTOOLS_VERSION" \
	&& find /usr/local \
		\( -type d -a -name test -o -name tests \) \
		-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
		-exec rm -rf '{}' + \
	&& cd / \
	&& rm -rf /usr/src/python ~/.cache

# install "virtualenv", since the vast majority of users of this image will want it
RUN pip3 install --no-cache-dir virtualenv

ENV PYTHON_DBUS_VERSION 1.2.8

# install dbus-python dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
		libdbus-1-dev \
		libdbus-glib-1-dev \
	&& rm -rf /var/lib/apt/lists/* \
	&& apt-get -y autoremove

# install dbus-python
RUN set -x \
	&& mkdir -p /usr/src/dbus-python \
	&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz" -o dbus-python.tar.gz \
	&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz.asc" -o dbus-python.tar.gz.asc \
	&& gpg --verify dbus-python.tar.gz.asc \
	&& tar -xzC /usr/src/dbus-python --strip-components=1 -f dbus-python.tar.gz \
	&& rm dbus-python.tar.gz* \
	&& cd /usr/src/dbus-python \
	&& PYTHON_VERSION=$(expr match "$PYTHON_VERSION" '\([0-9]*\.[0-9]*\)') ./configure \
	&& make -j$(nproc) \
	&& make install -j$(nproc) \
	&& cd / \
	&& rm -rf /usr/src/dbus-python

# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \
	&& ln -sf pip3 pip \
	&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
	&& ln -sf idle3 idle \
	&& ln -sf pydoc3 pydoc \
	&& ln -sf python3 python \
	&& ln -sf python3-config python-config

# set PYTHONPATH to point to dist-packages
ENV PYTHONPATH /usr/lib/python3/dist-packages:$PYTHONPATH

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'As of January 1st, 2020, Python 2 was end-of-life, we will change the latest tag for Balenalib Python base image to Python 3.x and drop support for Python 2 soon. So after 1st July, 2020, all the balenalib Python latest tag will point to the latest Python 3 version and no changes, or fixes will be made to balenalib Python 2 base image. If you are using Python 2 for your application, please upgrade to Python 3 before 1st July.' > /.balena/messages/python-deprecation-warning

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]

 RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@python.sh" \
  && echo "Running test-stack@python" \
  && chmod +x test-stack@python.sh \
  && bash test-stack@python.sh \
  && rm -rf test-stack@python.sh

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v7 \nOS: Debian Bullseye \nVariant: build variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nPython v3.8.5, Pip v20.1.1, Setuptools v49.1.0 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature  (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info

RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
	&& chmod +x /bin/sh-shim \
	&& cp /bin/sh /bin/sh.real \
	&& mv /bin/sh-shim /bin/sh


text:
# AUTOGENERATED FILE
FROM balenalib/jetson-xavier-nx-devkit-seeed-2mic-hat-ubuntu:bionic-build

ENV NODE_VERSION 14.18.2
ENV YARN_VERSION 1.22.4

RUN for key in \
	6A010C5166006599AA17F08146C2130DFD2497F5 \
	; do \
		gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
		gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \
		gpg --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
	done \
	&& curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-arm64.tar.gz" \
	&& echo "e78e18e01a08b2459d738fc5fec6bd79f2b3dccf85e5122cd646b3385964bc1e  node-v$NODE_VERSION-linux-arm64.tar.gz" | sha256sum -c - \
	&& tar -xzf "node-v$NODE_VERSION-linux-arm64.tar.gz" -C /usr/local --strip-components=1 \
	&& rm "node-v$NODE_VERSION-linux-arm64.tar.gz" \
	&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
	&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
	&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
	&& mkdir -p /opt/yarn \
	&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \
	&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
	&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \
	&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
	&& npm config set unsafe-perm true -g --unsafe-perm \
	&& rm -rf /tmp/*

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]

 RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@node.sh" \
  && echo "Running test-stack@node" \
  && chmod +x test-stack@node.sh \
  && bash test-stack@node.sh \
  && rm -rf test-stack@node.sh

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v8 \nOS: Ubuntu bionic \nVariant: build variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nNode.js v14.18.2, Yarn v1.22.4 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature  (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info

RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
	&& chmod +x /bin/sh-shim \
	&& cp /bin/sh /bin/sh.real \
	&& mv /bin/sh-shim /bin/sh


text:
FROM openjdk:8-jdk-alpine

# Metadata
LABEL module.maintainer="onesaitplatform@indra.es" \
	  module.name="configinit"

VOLUME /tmp

ADD *-exec.jar app.jar
ADD examples /tmp/examples

# Timezone
RUN apk add --no-cache tzdata

# web projects folder & logs folder
RUN mkdir -p /usr/local/webprojects && \
	mkdir -p /var/log/platform-logs && \
	mkdir ./target

# create onesait user/group
RUN addgroup -S onesait -g 433 && adduser -u 431 -S -g onesait -h /usr/local -s /sbin/nologin onesait

RUN apk add --no-cache mongodb-tools

RUN chown -R onesait:onesait /usr/local && \
    chown -R onesait:onesait /var/log/platform-logs && \
    chown -R onesait:onesait /tmp/examples && \
    chown -R onesait:onesait ./target && \
    chown onesait:onesait app.jar && \
    chmod -R 777 ./target

USER onesait

EXPOSE 21000

#HZ_SERVICE_DISCOVERY_STRATEGY can take values: service or zookeeper

ENV JAVA_OPTS="$JAVA_OPTS -Xms1G -Xmx3G" \
    SERVER_NAME=localhost \
    REALTIMEDBSERVERS=realtimedb:27017 \
    REALTIMEDBAUTHDB=admin \
    REALTIMEDBUSEAUTH=true \
    REALTIMEDBUSER=platformadmin \
    REALTIMEDBPASS=ENC(GGpZ1sLYnXwK+vz2QLkI/VK7geKcdM4pZaTL6hv6QTk=) \
    REALTIMEDBWRITECONCERN=UNACKNOWLEDGED \
    CONFIGDBMASTERURL="jdbc:mysql://configdb:3306/onesaitplatform_master_config?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false&autoReconnect=true&nullDatabaseMeansCurrent=true" \
    CONFIGDBURL="jdbc:mysql://configdb:3306/onesaitplatform_config?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false&autoReconnect=true&nullDatabaseMeansCurrent=true" \
    CONFIGDBUSER=root \
    CONFIGDBPASS=changeIt! \
    JDBCPROTOCOL="jdbc:mysql:" \
    DBADDPROPS="" \
    ELASTICDBHOST=elasticdb \
    ELASTICDBPORT=9200 \
    LOADCONFIGDB=true \
    LOADMONGODB=false \
    LOADELASTICDB=false \
    LOADMAILCONFIG=false \
    REALTIMEDBNAME=onesaitplatform_rtdb \
    CONTROLPANEL_SERVICE=localhost \
    UPDATE_MODE_MULTITENANT=true

ENTRYPOINT java $JAVA_OPTS -Dspring.application.json=$ONESAIT_PROPERTIES -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=docker -jar /app.jar


text:
# AUTOGENERATED FILE
FROM balenalib/ccimx8x-sbc-pro-alpine:3.15-build

ENV NODE_VERSION 17.9.1
ENV YARN_VERSION 1.22.4

# Install dependencies
RUN apk add --no-cache libgcc libstdc++ libuv \
	&& apk add --no-cache libssl1.0 || apk add --no-cache libssl1.1

RUN for key in \
	6A010C5166006599AA17F08146C2130DFD2497F5 \
	; do \
		gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
		gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \
		gpg --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
	done \
	&& curl -SLO "http://resin-packages.s3.amazonaws.com/node/v$NODE_VERSION/node-v$NODE_VERSION-linux-alpine-aarch64.tar.gz" \
	&& echo "4d008dc6a9b3fdf29471fef64b4bf7015cb9409b086102dd41554abe72bb3770  node-v$NODE_VERSION-linux-alpine-aarch64.tar.gz" | sha256sum -c - \
	&& tar -xzf "node-v$NODE_VERSION-linux-alpine-aarch64.tar.gz" -C /usr/local --strip-components=1 \
	&& rm "node-v$NODE_VERSION-linux-alpine-aarch64.tar.gz" \
	&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
	&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
	&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
	&& mkdir -p /opt/yarn \
	&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \
	&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
	&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \
	&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
	&& npm config set unsafe-perm true -g --unsafe-perm \
	&& rm -rf /tmp/*

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]

 RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@node.sh" \
  && echo "Running test-stack@node" \
  && chmod +x test-stack@node.sh \
  && bash test-stack@node.sh \
  && rm -rf test-stack@node.sh

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo $'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v8 \nOS: Alpine Linux 3.15 \nVariant: build variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nNode.js v17.9.1, Yarn v1.22.4 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature  (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info


text:
FROM ajsamk/jetson-nano-pytorch-ros:base

MAINTAINER Abhijith Sampathkrishna aj.sampathk@gmail.com

RUN apt-get -y update
RUN apt-get install -y lsb-release
RUN apt-get install -y software-properties-common

RUN apt-get install -y python3-pip

RUN pip3 install tqdm cython pycocotools
RUN apt-get install -y python3-matplotlib
RUN apt-get install -y python3-rospkg-modules

WORKDIR /home/

RUN git clone https://github.com/ajsampathk/pose_imitation.git
RUN apt-get update
RUN apt-get install -y ros-melodic-cv-bridge
ENV PYTHONPATH "${PYTHONPATH}:/opt/ros/melodic/lib/python2.7/dist-packages/"

COPY ros_entrypoint.sh /
ENTRYPOINT ["/bin/bash","ros_entrypoint.sh"]
CMD ["/bin/bash"]


text:
# AUTOGENERATED FILE
FROM balenalib/orange-pi-zero-debian:bullseye-build

ENV NODE_VERSION 18.3.0
ENV YARN_VERSION 1.22.4

RUN for key in \
	6A010C5166006599AA17F08146C2130DFD2497F5 \
	; do \
		gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \
		gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \
		gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
	done \
	&& curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-armv7l.tar.gz" \
	&& echo "fb85e8352d43de365effd4b9620bc22f2bc291213c13be2aeac88c8ea741c5ce  node-v$NODE_VERSION-linux-armv7l.tar.gz" | sha256sum -c - \
	&& tar -xzf "node-v$NODE_VERSION-linux-armv7l.tar.gz" -C /usr/local --strip-components=1 \
	&& rm "node-v$NODE_VERSION-linux-armv7l.tar.gz" \
	&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
	&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
	&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
	&& mkdir -p /opt/yarn \
	&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \
	&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
	&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \
	&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
	&& npm config set unsafe-perm true -g --unsafe-perm \
	&& rm -rf /tmp/*

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]

 RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@node.sh" \
  && echo "Running test-stack@node" \
  && chmod +x test-stack@node.sh \
  && bash test-stack@node.sh \
  && rm -rf test-stack@node.sh

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v7 \nOS: Debian Bullseye \nVariant: build variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nNode.js v18.3.0, Yarn v1.22.4 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature  (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info


text:
# AUTOGENERATED FILE
FROM balenalib/nanopi-neo-air-debian:bullseye-build

# remove several traces of debian python
RUN apt-get purge -y python.*

# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8

# key 63C7CC90: public key "Simon McVittie <smcv@pseudorandom.co.uk>" imported
# key 3372DCFA: public key "Donald Stufft (dstufft) <donald@stufft.io>" imported
RUN gpg --batch --keyserver keyring.debian.org --recv-keys 4DE8FF2A63C7CC90 \
	&& gpg --batch --keyserver keyserver.ubuntu.com --recv-key 6E3CBCE93372DCFA \
	&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 0x52a43a1e4b77b059

ENV PYTHON_VERSION 3.8.3

# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 20.1.1

ENV SETUPTOOLS_VERSION 49.1.0

RUN set -x \
	&& curl -SLO "http://resin-packages.s3.amazonaws.com/python/v$PYTHON_VERSION/Python-$PYTHON_VERSION.linux-armv7hf-openssl1.1.tar.gz" \
	&& echo "b6086e0553b44cf5eb44780ff3e689cae5d713bb8acb624f41f566fd7a4b19df  Python-$PYTHON_VERSION.linux-armv7hf-openssl1.1.tar.gz" | sha256sum -c - \
	&& tar -xzf "Python-$PYTHON_VERSION.linux-armv7hf-openssl1.1.tar.gz" --strip-components=1 \
	&& rm -rf "Python-$PYTHON_VERSION.linux-armv7hf-openssl1.1.tar.gz" \
	&& ldconfig \
	&& if [ ! -e /usr/local/bin/pip3 ]; then : \
		&& curl -SLO "https://raw.githubusercontent.com/pypa/get-pip/430ba37776ae2ad89f794c7a43b90dc23bac334c/get-pip.py" \
		&& echo "19dae841a150c86e2a09d475b5eb0602861f2a5b7761ec268049a662dbd2bd0c  get-pip.py" | sha256sum -c - \
		&& python3 get-pip.py \
		&& rm get-pip.py \
	; fi \
	&& pip3 install --no-cache-dir --upgrade --force-reinstall pip=="$PYTHON_PIP_VERSION" setuptools=="$SETUPTOOLS_VERSION" \
	&& find /usr/local \
		\( -type d -a -name test -o -name tests \) \
		-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
		-exec rm -rf '{}' + \
	&& cd / \
	&& rm -rf /usr/src/python ~/.cache

# install "virtualenv", since the vast majority of users of this image will want it
RUN pip3 install --no-cache-dir virtualenv

ENV PYTHON_DBUS_VERSION 1.2.8

# install dbus-python dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
		libdbus-1-dev \
		libdbus-glib-1-dev \
	&& rm -rf /var/lib/apt/lists/* \
	&& apt-get -y autoremove

# install dbus-python
RUN set -x \
	&& mkdir -p /usr/src/dbus-python \
	&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz" -o dbus-python.tar.gz \
	&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz.asc" -o dbus-python.tar.gz.asc \
	&& gpg --verify dbus-python.tar.gz.asc \
	&& tar -xzC /usr/src/dbus-python --strip-components=1 -f dbus-python.tar.gz \
	&& rm dbus-python.tar.gz* \
	&& cd /usr/src/dbus-python \
	&& PYTHON_VERSION=$(expr match "$PYTHON_VERSION" '\([0-9]*\.[0-9]*\)') ./configure \
	&& make -j$(nproc) \
	&& make install -j$(nproc) \
	&& cd / \
	&& rm -rf /usr/src/dbus-python

# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \
	&& ln -sf pip3 pip \
	&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
	&& ln -sf idle3 idle \
	&& ln -sf pydoc3 pydoc \
	&& ln -sf python3 python \
	&& ln -sf python3-config python-config

# set PYTHONPATH to point to dist-packages
ENV PYTHONPATH /usr/lib/python3/dist-packages:$PYTHONPATH

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'As of January 1st, 2020, Python 2 was end-of-life, we will change the latest tag for Balenalib Python base image to Python 3.x and drop support for Python 2 soon. So after 1st July, 2020, all the balenalib Python latest tag will point to the latest Python 3 version and no changes, or fixes will be made to balenalib Python 2 base image. If you are using Python 2 for your application, please upgrade to Python 3 before 1st July.' > /.balena/messages/python-deprecation-warning

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]

 RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@python.sh" \
  && echo "Running test-stack@python" \
  && chmod +x test-stack@python.sh \
  && bash test-stack@python.sh \
  && rm -rf test-stack@python.sh

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v7 \nOS: Debian Bullseye \nVariant: build variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nPython v3.8.3, Pip v20.1.1, Setuptools v49.1.0 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature  (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info

RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
	&& chmod +x /bin/sh-shim \
	&& cp /bin/sh /bin/sh.real \
	&& mv /bin/sh-shim /bin/sh


text:
# AUTOGENERATED FILE
FROM balenalib/odroid-c1-ubuntu:xenial-build

# remove several traces of debian python
RUN apt-get purge -y python.*

# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8

# key 63C7CC90: public key "Simon McVittie <smcv@pseudorandom.co.uk>" imported
# key 3372DCFA: public key "Donald Stufft (dstufft) <donald@stufft.io>" imported
RUN gpg --keyserver keyring.debian.org --recv-keys 4DE8FF2A63C7CC90 \
	&& gpg --keyserver keyserver.ubuntu.com --recv-key 6E3CBCE93372DCFA \
	&& gpg --keyserver keyserver.ubuntu.com --recv-keys 0x52a43a1e4b77b059

ENV PYTHON_VERSION 3.7.12

# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4

ENV SETUPTOOLS_VERSION 58.0.0

RUN set -x \
	&& curl -SLO "http://resin-packages.s3.amazonaws.com/python/v$PYTHON_VERSION/Python-$PYTHON_VERSION.linux-armv7hf-libffi3.2.tar.gz" \
	&& echo "cca21481e4824340e576630e2f19e52532e04ff42c9bc8b88694a7986a50c77c  Python-$PYTHON_VERSION.linux-armv7hf-libffi3.2.tar.gz" | sha256sum -c - \
	&& tar -xzf "Python-$PYTHON_VERSION.linux-armv7hf-libffi3.2.tar.gz" --strip-components=1 \
	&& rm -rf "Python-$PYTHON_VERSION.linux-armv7hf-libffi3.2.tar.gz" \
	&& ldconfig \
	&& if [ ! -e /usr/local/bin/pip3 ]; then : \
		&& curl -SLO "https://raw.githubusercontent.com/pypa/get-pip/430ba37776ae2ad89f794c7a43b90dc23bac334c/get-pip.py" \
		&& echo "19dae841a150c86e2a09d475b5eb0602861f2a5b7761ec268049a662dbd2bd0c  get-pip.py" | sha256sum -c - \
		&& python3 get-pip.py \
		&& rm get-pip.py \
	; fi \
	&& pip3 install --no-cache-dir --upgrade --force-reinstall pip=="$PYTHON_PIP_VERSION" setuptools=="$SETUPTOOLS_VERSION" \
	&& find /usr/local \
		\( -type d -a -name test -o -name tests \) \
		-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
		-exec rm -rf '{}' + \
	&& cd / \
	&& rm -rf /usr/src/python ~/.cache

# install "virtualenv", since the vast majority of users of this image will want it
RUN pip3 install --no-cache-dir virtualenv

ENV PYTHON_DBUS_VERSION 1.2.18

# install dbus-python dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
		libdbus-1-dev \
		libdbus-glib-1-dev \
	&& rm -rf /var/lib/apt/lists/* \
	&& apt-get -y autoremove

# install dbus-python
RUN set -x \
	&& mkdir -p /usr/src/dbus-python \
	&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz" -o dbus-python.tar.gz \
	&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz.asc" -o dbus-python.tar.gz.asc \
	&& gpg --verify dbus-python.tar.gz.asc \
	&& tar -xzC /usr/src/dbus-python --strip-components=1 -f dbus-python.tar.gz \
	&& rm dbus-python.tar.gz* \
	&& cd /usr/src/dbus-python \
	&& PYTHON_VERSION=$(expr match "$PYTHON_VERSION" '\([0-9]*\.[0-9]*\)') ./configure \
	&& make -j$(nproc) \
	&& make install -j$(nproc) \
	&& cd / \
	&& rm -rf /usr/src/dbus-python

# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \
	&& ln -sf pip3 pip \
	&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
	&& ln -sf idle3 idle \
	&& ln -sf pydoc3 pydoc \
	&& ln -sf python3 python \
	&& ln -sf python3-config python-config

# set PYTHONPATH to point to dist-packages
ENV PYTHONPATH /usr/lib/python3/dist-packages:$PYTHONPATH

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]

 RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@python.sh" \
  && echo "Running test-stack@python" \
  && chmod +x test-stack@python.sh \
  && bash test-stack@python.sh \
  && rm -rf test-stack@python.sh

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v7 \nOS: Ubuntu xenial \nVariant: build variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nPython v3.7.12, Pip v21.2.4, Setuptools v58.0.0 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature  (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info

RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
	&& chmod +x /bin/sh-shim \
	&& cp /bin/sh /bin/sh.real \
	&& mv /bin/sh-shim /bin/sh


text:
# TODO: decide on a specific version. Don't use the 'latest tag'
#
FROM microsoft/mssql-server-linux:latest

# Install python3.7
# We first need to add the deadsnakes repository that contains python3.7 packages.
# Secondly we install python3.7 and pip.
# Thirdly, we add all packages required for pyodbc to work (thats the line that ends with unxodbc-dev).
# Lastly, we purge the apt-get cache to not bloat the image.
#
RUN apt-get -y update && \
    apt-get install -y software-properties-common && \
    add-apt-repository -y ppa:deadsnakes/ppa && \
    apt-get -y update && \
    apt-get install -y python3.7 python3-pip && \
    apt-get install -y build-essential libssl-dev libffi-dev python3-dev python3.7-dev unixodbc-dev && \
    rm -rf /var/lib/apt/lists/*

# Install python3.7 pip
#
RUN python3.7 -m pip install pip
RUN python3.7 -m pip install --upgrade pip

# Copy Mlos.Python code
RUN mkdir -p /usr/src/Mlos.Python
WORKDIR /usr/src/

# Copy requirements first
# COPY ./requirements.txt ./Mlos.Python/requirements.txt
# RUN python3.7 -m pip install  /usr/src/Mlos.Python/requirements.txt

COPY . ./Mlos.Python
RUN python3.7 -m pip install ./Mlos.Python

# Let's set the environment variables
#
ENV ACCEPT_EULA=Y

# This has to be supplied during build like so: docker build --build-arg SA_PASSWORD=YourStrongPassword
#
ARG SA_PASSWORD=DEFAULT_SA_PASSWORD

# Let's start SQL Server and populate the schema
#
RUN (/opt/mssql/bin/sqlservr --accept-eula & ) | grep -q "Service Broker manager has started" && \
    /opt/mssql-tools/bin/sqlcmd -S127.0.0.1 -Usa -P${SA_PASSWORD} -i ./Mlos.Python/mlos/MlosOptimizationServices/ModelsDatabase/SQLScripts/Schema.sql

# Let's expose the SQL Server's port
#
EXPOSE 1433

# TODO: this has to be removed eventually, but it's better than what we have so far
ENV SA_PASSWORD=$SA_PASSWORD

CMD /opt/mssql/bin/sqlservr & \
    cd Mlos.Python; start_mlos_optimization_runtime launch --database-connection-string-file ./Secrets/local_docker_connection_string.json


text:
FROM resin/apalis-imx6q-ubuntu-buildpack-deps:latest

# remove several traces of debian python
RUN apt-get purge -y python.*

# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8

# install dbus-python dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
		libdbus-1-dev \
		libdbus-glib-1-dev \
	&& rm -rf /var/lib/apt/lists/* \
	&& apt-get -y autoremove

# key 63C7CC90: public key "Simon McVittie <smcv@pseudorandom.co.uk>" imported
# key 3372DCFA: public key "Donald Stufft (dstufft) <donald@stufft.io>" imported
RUN gpg --keyserver keyring.debian.org --recv-keys 4DE8FF2A63C7CC90 \
	&& gpg --keyserver keyserver.ubuntu.com --recv-key 6E3CBCE93372DCFA \
	&& gpg --keyserver keyserver.ubuntu.com --recv-keys 0x52a43a1e4b77b059

ENV PYTHON_VERSION 3.5.5

# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 10.0.1

ENV SETUPTOOLS_VERSION 39.1.0

RUN set -x \
	&& curl -SLO "http://resin-packages.s3.amazonaws.com/python/v$PYTHON_VERSION/Python-$PYTHON_VERSION.linux-armv7hf.tar.gz" \
	&& echo "44d5922736ba415e80c267b74e8e801a18c0404427a49f89286189dee8dee293  Python-3.5.5.linux-armv7hf.tar.gz" | sha256sum -c - \
	&& tar -xzf "Python-$PYTHON_VERSION.linux-armv7hf.tar.gz" --strip-components=1 \
	&& rm -rf "Python-$PYTHON_VERSION.linux-armv7hf.tar.gz" \
	&& ldconfig \
	&& if [ ! -e /usr/local/bin/pip3 ]; then : \
		&& curl -SLO "https://raw.githubusercontent.com/pypa/get-pip/430ba37776ae2ad89f794c7a43b90dc23bac334c/get-pip.py" \
		&& echo "19dae841a150c86e2a09d475b5eb0602861f2a5b7761ec268049a662dbd2bd0c  get-pip.py" | sha256sum -c - \
		&& python3 get-pip.py \
		&& rm get-pip.py \
	; fi \
	&& pip3 install --no-cache-dir --upgrade --force-reinstall pip=="$PYTHON_PIP_VERSION" setuptools=="$SETUPTOOLS_VERSION" \
	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
	&& find /usr/local \
		\( -type d -a -name test -o -name tests \) \
		-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
		-exec rm -rf '{}' + \
	&& cd / \
	&& rm -rf /usr/src/python ~/.cache

# install "virtualenv", since the vast majority of users of this image will want it
RUN pip3 install --no-cache-dir virtualenv

ENV PYTHON_DBUS_VERSION 1.2.4

# install dbus-python
RUN set -x \
	&& mkdir -p /usr/src/dbus-python \
	&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz" -o dbus-python.tar.gz \
	&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz.asc" -o dbus-python.tar.gz.asc \
	&& gpg --verify dbus-python.tar.gz.asc \
	&& tar -xzC /usr/src/dbus-python --strip-components=1 -f dbus-python.tar.gz \
	&& rm dbus-python.tar.gz* \
	&& cd /usr/src/dbus-python \
	&& PYTHON=python3.5 ./configure \
	&& make -j$(nproc) \
	&& make install -j$(nproc) \
	&& cd / \
	&& rm -rf /usr/src/dbus-python

# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \
	&& ln -sf pip3 pip \
	&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
	&& ln -sf idle3 idle \
	&& ln -sf pydoc3 pydoc \
	&& ln -sf python3 python \
	&& ln -sf python3-config python-config

CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: http://docs.resin.io/deployment/dockerfile"]
ENV PYTHONPATH /usr/lib/python3/dist-packages:$PYTHONPATH