<file_sep>FROM alpine:3.4

MAINTAINER Urb-it AB <<EMAIL>>

ENV SUPERVISOR_VERSION=3.3.3

ADD ./worker.conf /etc/supervisord.conf
COPY requirements.txt .

# Install dependencies
RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing \
>> /etc/apk/repositories \
&& echo http://dl-4.alpinelinux.org/alpine/edge/main \
>> /etc/apk/repositories \
&& echo http://dl-4.alpinelinux.org/alpine/edge/community \
>> /etc/apk/repositories \
&& apk --no-cache --update add \
   openssl-dev \
   openssl \
   ca-certificates \
   python2 \
   python3 \
&& update-ca-certificates \
&& python3 -m ensurepip \
&& python -m ensurepip \
&& rm -r /usr/lib/python*/ensurepip \
&& pip3 install --upgrade pip setuptools \
&& pip3 install -r requirements.txt \
&& pip install \
    supervisor==$SUPERVISOR_VERSION \
    supervisor-stdout \
&& rm -r /root/.cache \
&& apk --no-cache del \
    wget \
    openssl-dev \
&& rm -rf /var/cache/apk/* /tmp/*

WORKDIR /usr/local/worker

ENTRYPOINT ["/bin/sh", "-c", "supervisord", "--nodaemon" ,"--configuration /etc/supervisord.conf"]
<file_sep>FROM logstash:2

MAINTAINER <NAME> <<EMAIL>>

RUN plugin install logstash-output-amazon_es

RUN apt-get update && apt-get install -y --no-install-recommends gettext-base \
	&& rm -rf /var/lib/apt/lists/*

COPY ims.tpl.conf /config/ims.tpl.conf
COPY init.sh /init.sh
RUN chmod +x /init.sh

CMD /init.sh<file_sep>FROM openjdk:8-jre-buster

LABEL maintainer="<EMAIL>"

# Environment variables
ENV YARN_VERSION 1.0.2

# Add nodejs repo
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -

# Install & clean up dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
	ocaml \
	libelf-dev \
	nodejs \
	git \
	build-essential \
	&& npm i -g \
	yarn@$YARN_VERSION \
	&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*

# Set /usr/bin/python to be v3.7
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1

WORKDIR /home
<file_sep>FROM php:7.3-alpine3.13

MAINTAINER Urbit <<EMAIL>>

# Add configs
ADD ./prooph.ini /usr/local/etc/php/conf.d
ADD ./worker.conf /etc/supervisor/worker.conf

# Environment variables
ENV ALPINE_VERSION 3.13
ENV PHP_API_VERSION 20160303
ENV PYTHON_VERSION=3.8.10-r0
ENV PY_PIP_VERSION=20.3.4-r0
ENV SUPERVISOR_VERSION=4.2.4
ENV MONGODB_VERSION=1.6.1
ENV PHP_AMQP_VERSION=1.9.4

ARG UID=1000
ARG GID=2000

# Install & clean up dependencies
RUN apk --no-cache --update --repository http://dl-cdn.alpinelinux.org/alpine/v$ALPINE_VERSION/main/ add \
    autoconf \
    build-base \
    ca-certificates \
    python3=$PYTHON_VERSION \
    py3-pip=$PY_PIP_VERSION \
    curl \
    openssl \
    openssl-dev \
    rabbitmq-c \
    rabbitmq-c-dev \
    libtool \
    icu \
    icu-libs \
    icu-dev \
    libwebp

RUN apk --no-cache --update --repository http://dl-3.alpinelinux.org/alpine/v$ALPINE_VERSION/community/ add \
    php7-sockets \
    php7-zlib \
    php7-intl \
    php7-opcache \
    php7-bcmath \
&& docker-php-ext-configure intl \
&& pecl install \
    mongodb-$MONGODB_VERSION \
    amqp-$PHP_AMQP_VERSION \
&& docker-php-ext-install \
    sockets \
    intl \
    opcache \
    bcmath \
&& docker-php-ext-enable \
    mongodb \
    amqp \
&& apk --no-cache del \
    wget \
    icu-dev \
    tar \
    autoconf \
    build-base \
    rabbitmq-c-dev \
    libtool \
&& rm -rf /var/cache/apk/* /tmp/* ./newrelic-php5-$NEWRELIC_VERSION-linux-musl*

# Install supervisor
RUN pip3 install supervisor==$SUPERVISOR_VERSION

WORKDIR /var/www/application

RUN addgroup -g $GID -S prooph || true \
    && adduser -u $UID -D -S -h /var/cache/nginx -s /sbin/nologin -G prooph prooph || true

RUN chown -R prooph:prooph /var/www/application

USER prooph
RUN touch /var/www/application/supervisord.log
CMD sh -c "supervisord --nodaemon --configuration /etc/supervisor/worker.conf"
<file_sep>FROM alpine:3.4

MAINTAINER <NAME> <<EMAIL>>
ENV REFRESHED_AT 20160823

ENV S3FS_VERSION 1.79
RUN apk --update --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community/ add \
    fuse \
    alpine-sdk \
    linux-pam \
    automake \
    autoconf \
    libxml2-dev \
    shadow \
    fuse-dev \
    curl-dev \
    vsftpd \
    && wget -qO- https://github.com/s3fs-fuse/s3fs-fuse/archive/v${S3FS_VERSION}.tar.gz|tar xz \
    && cd s3fs-fuse-${S3FS_VERSION} \
    && ./autogen.sh \
    && ./configure --prefix=/usr \
    && make \
    && make install \
    && rm -rf /var/cache/apk/*

RUN ln -sf /dev/stdout /var/log/vsftpd.log

COPY fuse.conf /etc/fuse.conf
COPY vsftpd.conf /etc/vsftpd/vsftpd.conf
COPY ssl.conf /etc/vsftpd/ssl.conf
COPY init.sh /init.sh
RUN chmod +x /init.sh
RUN addgroup ftpuser

CMD /init.sh && s3fs ${VSFTP_S3_BUCKET}:/ ${VSFTP_S3_MOUNTPOINT} -o endpoint=${VSFTP_S3_REGION} -o allow_other -o umask=0002 && vsftpd /etc/vsftpd/vsftpd.conf
<file_sep>FROM quay.io/urbit/gunicorn-python:latest

MAINTAINER <NAME> <<EMAIL>>

COPY requirements.txt .
COPY pep8 /root/.config/pep8
COPY flake8 /root/.config/flake8
# Install dependencies

RUN apk --update add --virtual build-dependencies \
        build-base \
        --update-cache \
        --repository http://dl-3.alpinelinux.org/alpine/edge/community/ --allow-untrusted \
        --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted \
    && pip3 install -r requirements.txt

# Remove dependencies & clean up
RUN apk --no-cache del \
    wget \
    build-dependencies \
&& rm -rf /var/cache/apk/* /tmp/*
<file_sep>FROM centos:7

MAINTAINER <NAME> <<EMAIL>>

WORKDIR /home/fluent
ENV PATH /home/fluent/.gem/ruby/2.3.0/bin:$PATH

USER root

# Ensure there are enough file descriptors for running Fluentd.
RUN ulimit -n 65536

# Copy the Fluentd configuration file.
COPY td-agent.conf /etc/td-agent/td-agent.conf

# Install dependencies
RUN yum update -y \
    && yum groupinstall -y development \
    && yum install -y sudo ruby-devel \
    
    # Install fluentd
    && curl -sSL https://toolbelt.treasuredata.com/sh/install-redhat-td-agent3.sh | sh \

    # Change the default user and group to root.
    # Needed to allow access to /var/log/docker/... files.
    && sed -i -e "s/USER=td-agent/USER=root/" -e "s/GROUP=td-agent/GROUP=root/" /etc/init.d/td-agent \

    # http://www.fluentd.org/plugins
    && td-agent-gem install --no-document \
        fluent-plugin-kubernetes_metadata_filter:2.3.0 \
        fluent-plugin-loggly:0.0.9 \
        fluent-plugin-grok-parser:2.1.4 \
        fluent-plugin-record-modifier:0.5.0 \
        fluent-plugin-mutate_filter:0.2.0 \
        fluent-plugin-multi-format-parser:1.0.0 \
        fluent-plugin-elasticsearch:3.5.2 \
        fluent-plugin-flatten-hash:0.5.1 \
    && yum remove -y sudo \
    && rm -rf /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/json-1.8.1

EXPOSE 24284
EXPOSE 5140/udp

# Run the Fluentd service.
CMD ["td-agent"]
<file_sep>FROM php:7.1-cli-alpine3.10

MAINTAINER <NAME> <<EMAIL>>

ENV RABBITMQ_VERSION v0.8.0
ENV PHP_AMQP_VERSION v1.9.4
ENV PHP_REDIS_VERSION 3.1.4
ENV PHP_MONGO_VERSION 1.6.1

# persistent / runtime deps
ENV PHPIZE_DEPS \
    autoconf \
    cmake \
    file \
    g++ \
    gcc \
    libc-dev \
    pcre-dev \
    make \
    git \
    pkgconf \
    re2c

RUN apk add --no-cache --virtual .persistent-deps \
    # for intl extension
    icu-dev \
    # for mcrypt extension
    libmcrypt-dev \
    # for mongodb
    libressl \
    libressl-dev \
    # for zero mq
    libsodium-dev \
    # for postgres
    postgresql-dev \
    # for soap
    libxml2-dev \
    zeromq

RUN set -xe \
    && apk add --no-cache --virtual .build-deps \
        $PHPIZE_DEPS \
        openssl-dev \
        zeromq-dev \
    && docker-php-ext-configure bcmath --enable-bcmath \
    && docker-php-ext-configure intl --enable-intl \
    && docker-php-ext-configure pcntl --enable-pcntl \
    && docker-php-ext-configure pdo_mysql --with-pdo-mysql \
    && docker-php-ext-configure mbstring --enable-mbstring \
    && docker-php-ext-configure soap --enable-soap \
    && docker-php-ext-install \
        bcmath \
        intl \
        pcntl \
        pdo_mysql \
        mbstring \
        soap \
    && git clone --branch ${RABBITMQ_VERSION} https://github.com/alanxz/rabbitmq-c.git /tmp/rabbitmq \
        && cd /tmp/rabbitmq \
        && mkdir build && cd build \
        && cmake .. \
        && cmake --build . --target install \
        # workaround for linking issue
        && cp -r /usr/local/lib64/* /usr/lib/ \
    && git clone --branch ${PHP_AMQP_VERSION} https://github.com/pdezwart/php-amqp.git /tmp/php-amqp \
        && cd /tmp/php-amqp \
        && phpize  \
        && ./configure  \
        && make  \
        && make install \
    && git clone --branch ${PHP_REDIS_VERSION} https://github.com/phpredis/phpredis /tmp/phpredis \
        && cd /tmp/phpredis \
        && phpize  \
        && ./configure  \
        && make  \
        && make install \
        && make test \
    && git clone --branch ${PHP_MONGO_VERSION} https://github.com/mongodb/mongo-php-driver /tmp/php-mongo \
        && cd /tmp/php-mongo \
        && git submodule sync && git submodule update --init \
        && phpize  \
        && ./configure  \
        && make  \
        && make install \
        && make test \
    && apk del .build-deps \
    && rm -rf /tmp/* \
    && rm -rf /app \
    && mkdir /app

# Copy configuration
COPY config/php-cli.ini /usr/local/etc/php/php.ini
COPY config/php7.ini /usr/local/etc/php/conf.d/
COPY config/amqp.ini /usr/local/etc/php/conf.d/
COPY config/redis.ini /usr/local/etc/php/conf.d/
COPY config/mongodb.ini /usr/local/etc/php/conf.d/

# Install dependencies
RUN apk --no-cache --update --repository http://dl-3.alpinelinux.org/alpine/edge/community/ add \
    git \
    curl \
    nodejs \
&& apk --no-cache del \
    wget

WORKDIR /app

# Install Composer & dependencies
RUN curl -sSL http://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer \
&& chmod +x /usr/local/bin/composer \
&& composer global require "hirak/prestissimo:^0.3"

# Set up the application directory
VOLUME ["/app"]
<file_sep>FROM golang:1.8-alpine

ENV PATH /go/bin:$PATH

# Install dependencies
RUN apk --no-cache --update --repository http://dl-3.alpinelinux.org/alpine/edge/community/ add \
    curl \
    glide \
    git \
    make \
&& apk --no-cache del \
    wget

WORKDIR /go
<file_sep>Urb-it Docker Images
====================

These are Urb-it's Docker images, used mainly for internal development.

quay.io builds and tags these images with the "latest" tag when the master branch is updated
If you want a specific tag (i.e, a version number) you have to build, tag and push the image manually

## Docker Snippets
Useful snippets for building, tagging, cleanups etc.

#### Build and tag a docker image
```
docker build {FOLDER_CONTAINING_DOCKERFILE} -t {repository}/{imagename}:{tag}
docker build ./ -t quay.io/urbit/fluentd-loggly:1.2
```

#### Push a tagged docker image to a repository (i.e, quay.io)
```
docker push {repository}/{imagename}:{tag}
docker push quay.io/urbit/fluentd-loggly:1.2
```

#### Stop all containers
```
docker stop $(docker ps -a -q)
```
```
docker ps -a -q | xargs docker stop
```

#### Remove all containers
```
docker rm $(docker ps -a -q)
```
```
docker ps -a -q | xargs docker rm
```

#### Remove all images
```
docker rmi $(docker images -q)
```
```
docker images -q | xargs docker rmi
```

#### Remove orphaned volumes
```
docker volume rm $(docker volume ls -qf dangling=true)
```
```
docker volume ls -qf dangling=true | xargs docker volume rm
```

#### Remove exited containers
```
docker rm -v $(docker ps -a -q -f status=exited)
```
```
docker ps -a -q -f status=exited | xargs docker rm -v
```

#### Stop & Remove all containers with base image name <image_name>
```
docker rm $(docker stop $(docker ps -a -q --filter ancestor=<image_name>))
```
```
docker ps -a -q --filter ancestor=<image_name> | xargs docker stop | xargs docker rm
```

#### Remove dangling images
```
docker rmi $(docker images -f "dangling=true" -q)
```
```
docker images -f "dangling=true" -q | xargs docker rmi
```

#### Cleanup Volumes
```
docker run -v /var/run/docker.sock:/var/run/docker.sock \
           -v /var/lib/docker:/var/lib/docker \
           --rm martin/docker-cleanup-volumes
```

#### Remove all DinD containers
```
docker rm $(docker stop $(docker ps -a -q --filter ancestor=urbit/dind-jenkins))
```

#### Cleanup exited + orphaned + DinD
```
docker ps -a -q -f status=exited | xargs docker rm -v && \
docker volume ls -qf dangling=true | xargs docker volume rm && \
docker ps -a -q --filter ancestor=urbit/dind-jenkins | xargs docker stop | xargs docker rm
```

#### Docker-outside-of-Docker
```
docker run -d -v /var/run/docker.sock:/var/run/docker.sock \
              -v $(which docker):/usr/bin/docker -p 8080:8080 my-dood-container
```

#### Docker-inside-Docker
```
docker run --privileged --name my-dind-container -d docker:dind
```
```
docker run --privileged --name my-dind-container -d urbit/dind-jenkins:latest
```
<file_sep>pymongo[tls]
pika==0.11.0
requests==2.21.0
redlock-py==1.0.8
redis==2.10.6
<file_sep>FROM openresty/openresty:1.17.8.2-5-alpine

ARG UID=1000
ARG GID=2000

RUN deluser nginx || true \
    && delgroup nginx || true \
    && addgroup -g $GID -S nginx || true \
    && adduser -u $UID -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx || true

# Copy files & set permissions
COPY nginx.conf /usr/local/openresty/nginx/conf/
COPY init-d-nginx /etc/init.d/nginx

RUN mkdir -p /usr/local/api-gateway/nginx/conf.d && \
    mkdir -p /usr/local/api-gateway/nginx/upstream && \
    chmod +x /etc/init.d/nginx

# Install dependencies
RUN echo http://dl-4.alpinelinux.org/alpine/3.8/testing \
>> /etc/apk/repositories \
&& echo http://dl-4.alpinelinux.org/alpine/3.8/main \
>> /etc/apk/repositories \
&& apk --no-cache --update add \
   nettle nettle-dev gcc lua5.1-dev curl perl luarocks5.1 openssl-dev tar g++ make openssl cmake tzdata \
&& ln -s /usr/bin/luarocks-5.1 /usr/bin/luarocks

# mongo-c-driver libbson 1.5.2
RUN cd /tmp \
&& curl -L -O https://github.com/mongodb/mongo-c-driver/releases/download/1.6.0/mongo-c-driver-1.6.0.tar.gz \
&& tar xzf mongo-c-driver-1.6.0.tar.gz \
&& cd mongo-c-driver-1.6.0 \
&& ./configure --disable-automatic-init-and-cleanup \
&& make clean \
&& make \
&& make clean \
&& make install .

RUN /usr/bin/luarocks install mongorover \
&& /usr/bin/luarocks install rapidjson \
&& /usr/bin/luarocks install date \
&& /usr/bin/luarocks install luatz
# Cleanup
RUN apk --no-cache del wget lua5.1-dev openssl-dev tar luarocks5.1 g++ make cmake  \
&& rm -rf /var/cache/apk/* /tmp/*
# Install opm packages
RUN opm install chunpu/shim pintsized/lua-resty-http sumory/lor bungle/lua-resty-nettle=1.5 SkyLothar/lua-resty-jwt

WORKDIR /usr/local/api-gateway

RUN chown -R $UID:0 /usr/local/openresty/nginx

USER nginx

EXPOSE 8080

<file_sep>#!/bin/bash

envsubst < /config/ims.tpl.conf > /config/ims.conf
logstash -f /config/ims.conf<file_sep>FROM python:3.5-alpine

MAINTAINER <NAME> <<EMAIL>>

COPY requirements.txt .

# Install dependencies

RUN apk --update add --virtual build-dependencies \
        ca-certificates \
        openssl \
        tini \
        g++ \
        build-base \
        --update-cache \
        --repository http://dl-3.alpinelinux.org/alpine/edge/community/ --allow-untrusted \
        --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted \
    && ln -s /usr/include/locale.h /usr/include/xlocale.h \
    && pip3 install -r requirements.txt

# Remove dependencies & clean up
RUN apk --no-cache del \
    wget \
    build-dependencies \
&& rm -rf /var/cache/apk/* /tmp/*
<file_sep>date.timezone = UTC
memory_limit = -1
error_reporting=E_ALL
display_errors=true
soap.wsdl_cache_enabled=0<file_sep>FROM alpine:latest
MAINTAINER <NAME> <<EMAIL>>

# Environment variables
ENV LUA_VERSION 5.1
ENV ALPINE_VERSION 3.6
ENV LUA_PACKAGE lua${LUA_VERSION}
ENV APPLICATION_PATH  /usr/local/application

# LPUpdate apk index.

RUN echo http://dl-4.alpinelinux.org/alpine/v${ALPINE_VERSION}/main \
echo http://dl-4.alpinelinux.org/alpine/edge/testing \
>> /etc/apk/repositories \
&& echo http://dl-4.alpinelinux.org/alpine/edge/main \
>> /etc/apk/repositories \
&& echo http://dl-4.alpinelinux.org/alpine/edge/community \
>> /etc/apk/repositories \
&& apk --no-cache --update add \
    autoconf \
    build-base \
    ca-certificates \
    ${LUA_PACKAGE} \
    ${LUA_PACKAGE}-dev \
    luarocks${LUA_VERSION} \
    lua${LUA_VERSION}-filesystem \
    lua${LUA_VERSION}-busted \
    openssl-dev \ 
    tar \ 
    g++ \ 
    make \ 
    openssl \ 
    cmake \
    perl \
    gcc \
    unzip \
    curl \
&& ln -s /usr/bin/luarocks-${LUA_VERSION} /usr/bin/luarocks \
&& mkdir -p /root/.cache/luarocks \
&& /usr/bin/luarocks install luacheck  \
&& apk --no-cache del \ 
    wget \
    ${LUA_PACKAGE}-dev \
    luarocks5.1 \
    openssl-dev \ 
    tar \ 
    g++ \ 
    make \ 
    openssl \ 
    cmake \
    build-base \
&& rm -rf /var/cache/apk/* /tmp/* \
&& mkdir ${APPLICATION_PATH}

WORKDIR ${APPLICATION_PATH}
<file_sep>FROM openresty/openresty:alpine

MAINTAINER <NAME> <<EMAIL>>

ENV GOPATH /go
ENV PATH $PATH:$GOPATH/bin

# Copy files & set permissions
COPY nginx.conf /usr/local/openresty/nginx/conf/
COPY init-d-nginx /etc/init.d/nginx
COPY start-geoip-service.sh /usr/local/bin
COPY update-database.sh /etc/periodic/daily
RUN mkdir /go \
&& chmod +x /usr/local/bin/start-geoip-service.sh \
&& chmod +x /etc/init.d/nginx \
&& chmod +x /etc/periodic/daily/update-database.sh

# Install dependencies
RUN apk --no-cache --update add \
    go \
    curl \
    perl \
&& apk --no-cache del \
    wget \
&& apk --no-cache --update add --virtual build-dependencies \
    git \
    musl-dev \
    autoconf \
    automake \
    libtool \
    make \
    zlib-dev \
    curl-dev

RUN opm install chunpu/shim
# Install and Configure GeoIP service
RUN go get github.com/klauspost/geoip-service \
&& git clone https://github.com/maxmind/geoipupdate && \
  cd geoipupdate && \
  ./bootstrap && \
  ./configure && \
  make && \
  make install && \
  mkdir /usr/local/share/GeoIP

# Remove dependencies & clean up
RUN apk --no-cache del \
    wget \
    build-dependencies \
&& rm -rf /var/cache/apk/* /tmp/*

# Set up container logging
RUN ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log && \
    ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log

# Start services
ENTRYPOINT ["/usr/local/bin/start-geoip-service.sh"]

WORKDIR /usr/local/openresty/nginx

EXPOSE 80 443 5000
<file_sep>FROM alpine:3.4

MAINTAINER <NAME> <<EMAIL>>

ENV SUPERVISOR_VERSION=3.3.1
ENV GOPATH /go
ENV GO15VENDOREXPERIMENT 1
ENV KUBE_VERSION="v1.4.6"
ENV HELM_VERSION="v2.0.2"
ENV HELM_FILENAME="helm-${HELM_VERSION}-linux-amd64.tar.gz"

ADD ./worker.conf /etc/supervisord.conf

# Install dependencies
RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing \
>> /etc/apk/repositories \
&& echo http://dl-4.alpinelinux.org/alpine/edge/main \
>> /etc/apk/repositories \
&& echo http://dl-4.alpinelinux.org/alpine/edge/community \
>> /etc/apk/repositories \
&& apk --no-cache --update add \
   gcc \
   curl \
   perl \
   openssl-dev \
   tar \
   unzip \
   g++ \
   git \
   make \
   cmake \
   openssl \
   go \
   ca-certificates \
   luajit \
   py-pip \
&& update-ca-certificates \
&& curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl \
    && chmod +x /usr/local/bin/kubectl \
    && curl -L http://storage.googleapis.com/kubernetes-helm/${HELM_FILENAME} -o /tmp/${HELM_FILENAME} \
    && tar -zxvf /tmp/${HELM_FILENAME} -C /tmp \
    && mv /tmp/linux-amd64/helm /usr/local/bin/helm \
    && chmod +x /usr/local/bin/helm && helm init -c && helm repo add urbit http://charts.urb-it.io \
&& go get github.com/urbitassociates/cli53 ;\
    cd $GOPATH/src/github.com/urbitassociates/cli53 ;\
    make install \
&& pip install \
    supervisor==$SUPERVISOR_VERSION \
    supervisor-stdout \
    redis \
    enum34 \
&& apk --no-cache del \
    wget \
    openssl-dev \
    tar \
    gcc \
    g++ \
    git \
    make \
    cmake \
    unzip \
    go \
&& rm -rf /var/cache/apk/* /tmp/* $GOPATH/src

WORKDIR /var/application

ENTRYPOINT ["/bin/sh", "-c", "supervisord", "--nodaemon" ,"--configuration /etc/supervisord.conf"]
<file_sep># node-workspace
Workspace image for Node.js with added dependencies for Facebook Flow and Yarn<file_sep>FROM alpine:3.4

MAINTAINER <NAME> <<EMAIL>>

ARG K8S_VERSION=1.7.5
ARG HELM_VERSION=2.6.2

# Install dependencies
RUN apk --no-cache --update --repository http://dl-3.alpinelinux.org/alpine/edge/community/ add \
    curl \
    git \
&& apk --no-cache del \
    wget \
&& rm -rf /var/cache/apt/archives

# Install kubectl & helm
RUN curl -#SL -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v$K8S_VERSION/bin/linux/amd64/kubectl \
&& chmod +x /usr/local/bin/kubectl \
&& curl -#SL https://storage.googleapis.com/kubernetes-helm/helm-v$HELM_VERSION-linux-amd64.tar.gz | tar zxvf - \
&& mv linux-amd64/helm /usr/local/bin/helm && rm -rf linux-amd64 \
&& chmod +x /usr/local/bin/helm \
&& mkdir -p ~/.kube && helm init -c

WORKDIR /home

CMD kubectl
<file_sep>error_log = /proc/self/fd/2
decorate_workers_output = no
<file_sep>#!/bin/sh
mkdir -p ${VSFTP_S3_MOUNTPOINT}
if [ -n ${SSL_CERTIFICATE+x} ]
    then
        mkdir -p /var/cert
        mount tmpfs /var/cert -t tmpfs -o size=16M
        echo -e "$SSL_CERTIFICATE" | sed -e 's/^"//' -e 's/"$//' > /var/cert/vsftpd.pem
        echo "" >> /etc/vsftpd/vsftpd.conf
        cat /etc/vsftpd/ssl.conf >> /etc/vsftpd/vsftpd.conf
        unset SSL_CERTIFICATE
fi
<file_sep>date.timezone = UTC
display_errors = Off
log_errors = On
memory_limit = 512M

# Opcache
opcache.enable=1
opcache.memory_consumption=64
opcache.max_accelerated_files=2000
opcache_revalidate_freq=240
<file_sep>FROM php:7.1-alpine

MAINTAINER <NAME> <<EMAIL>>

ENV MONGODB_VERSION=1.2.5

# Install dependencies & clean up
RUN apk --no-cache --update --repository http://dl-3.alpinelinux.org/alpine/edge/community/ add \
    php7-sockets \
    php7-bcmath \
    curl \
    openssl-dev \
    openssl \
    autoconf \
    build-base \
    icu \
    icu-dev \
&& apk --no-cache del \
    wget 
RUN pecl install \
    mongodb-$MONGODB_VERSION \
&& docker-php-ext-install \
    pdo_mysql \
    sockets \
    intl \
    bcmath \
&& docker-php-ext-enable \
    mongodb

RUN rm -rf /var/cache/apk/* /tmp/* \
&& apk --no-cache del \
    build-base \
    autoconf \
    openssl-dev \
    icu-dev

# Add config & crontab
ADD ./lumen.ini /usr/local/etc/php/conf.d
ADD lumen-scheduler.crontab /lumen-scheduler.crontab
RUN /usr/bin/crontab /lumen-scheduler.crontab

WORKDIR /var/www/application
<file_sep>FROM nginx:1.20.1-alpine

COPY auto-reload-nginx.sh /home/auto-reload-nginx.sh
COPY nginx.conf /etc/nginx/
COPY default.conf /etc/nginx/conf.d/default.conf

RUN chmod +x /home/auto-reload-nginx.sh

ARG UID=1000
ARG GID=2000

# Install & clean up dependencies
RUN apk --no-cache --update --repository http://dl-3.alpinelinux.org/alpine/edge/community/ add \
    curl \
    shadow \
    inotify-tools \
&& apk --no-cache del \
    wget \
&& rm -rf /var/cache/apk/* /tmp/*

# Set up user
RUN deluser nginx || true \
    && delgroup nginx || true \
    && addgroup -g $GID -S nginx || true \
    && adduser -u $UID -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx || true

RUN chown nginx /home/auto-reload-nginx.sh \
    && chown -R $UID:0 /var/cache/nginx \
    && chmod -R g+w /var/cache/nginx \
    && chown -R $UID:0 /etc/nginx \
    && chmod -R g+w /etc/nginx

# Set up logging
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
    ln -sf /dev/stderr /var/log/nginx/error.log

CMD ["/home/auto-reload-nginx.sh"]

WORKDIR /var/www/application

USER nginx

EXPOSE 8080
<file_sep>FROM python:3.9-alpine3.17

RUN python -m pip install --upgrade pip

# Install dependencies
RUN apk --update add \
    ca-certificates \
    openssl \
    tini \
    g++ \
    gdal \
    geos \
    --update-cache \
    --repository http://dl-3.alpinelinux.org/alpine/v3.17/community --allow-untrusted \
    --repository http://dl-3.alpinelinux.org/alpine/edge/community --allow-untrusted \
    --repository http://dl-3.alpinelinux.org/alpine/edge/testing --allow-untrusted \
    --repository http://dl-3.alpinelinux.org/alpine/edge/main --allow-untrusted

RUN apk --update add --virtual build-dependencies \
        build-base \
        gdal-dev \
        geos-dev \
        --update-cache \
        --repository http://dl-3.alpinelinux.org/alpine/v3.17/community --allow-untrusted \
        --repository http://dl-3.alpinelinux.org/alpine/edge/community --allow-untrusted \
        --repository http://dl-3.alpinelinux.org/alpine/edge/testing --allow-untrusted \
        --repository http://dl-3.alpinelinux.org/alpine/edge/main --allow-untrusted \
    && ln -s /usr/include/locale.h /usr/include/xlocale.h \
    && pip install gunicorn \
    && pip install gevent \
    && pip install cython \
    && pip install numpy 
    
# Remove dependencies & clean up
RUN apk --no-cache del \
    wget \
    build-dependencies \
&& rm -rf /var/cache/apk/* /tmp/*
<file_sep>FROM nginx:1.21.5-alpine

ARG PHP_UPSTREAM=php-fpm

ARG UID=1000
ARG GID=2000

COPY auto-reload-nginx.sh /home/auto-reload-nginx.sh
COPY nginx.conf /etc/nginx/
COPY lumen.conf /etc/nginx/conf.d/default.conf
COPY tracking.conf /etc/nginx/conf.d/tracking.conf

RUN echo "upstream php-upstream { server ${PHP_UPSTREAM}:9000; }" > /etc/nginx/conf.d/upstream.conf \
&& chmod +x /home/auto-reload-nginx.sh

# Install & clean up dependencies
RUN apk --no-cache --update --repository http://dl-3.alpinelinux.org/alpine/edge/community/ add \
    curl \
    shadow \
    inotify-tools \
&& apk --no-cache del \
    wget \
&& rm -rf /var/cache/apk/* /tmp/*

# Set up user

RUN deluser nginx || true \
    && delgroup nginx || true \
    && addgroup -g $GID -S nginx || true \
    && adduser -u $UID -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx || true

RUN chown nginx /home/auto-reload-nginx.sh \
    && chown -R $UID:0 /var/cache/nginx \
    && chmod -R g+w /var/cache/nginx \
    && chown -R $UID:0 /etc/nginx \
    && chmod -R g+w /etc/nginx

CMD ["/home/auto-reload-nginx.sh"]

WORKDIR /var/www/application

USER nginx

EXPOSE 8080
<file_sep>pytz==2017.3
python-dateutil==2.6.1
gevent==1.2.2
gunicorn==19.7.1
redlock-py==1.0.8
<file_sep>#!/usr/bin/env sh

echo "UserId ${MAXMIND_USER_ID}">/usr/local/etc/GeoIP.conf;
echo "LicenseKey ${MAXMIND_LICENSE_KEY}">> /usr/local/etc/GeoIP.conf;
echo "ProductIds GeoIP2-City GeoIP2-Country">> /usr/local/etc/GeoIP.conf;

nohup /usr/local/openresty/bin/openresty  > /dev/null 2>&1 &
# It will take some seconds before the service is accessible
/usr/local/bin/geoipupdate && /go/bin/geoip-service -db=/usr/local/share/GeoIP/GeoIP2-City.mmdb -listen=':5000'
<file_sep>MaxMind GeoIP
=============

Sets up a MaxMind GeoIP service.

## Environment vars 
    MAXMIND_USER_ID: <user id>
    MAXMIND_LICENSE_KEY: <license key><file_sep>astroid==1.6.1
isort==4.3.2
pylint==1.8.2
coverage==4.5
hacking==1.0.0
