95 lines
2.9 KiB
Docker
95 lines
2.9 KiB
Docker
|
FROM docker.mimirdb.info/alpine_oraclejdk8_nginx
|
||
|
|
||
|
# Metadata
|
||
|
LABEL base.image="docker.mimirdb.info/alpine_oraclejdk8_nginx"
|
||
|
LABEL version="0.2"
|
||
|
LABEL software="Vizier"
|
||
|
LABEL software.version="0.2.20180928"
|
||
|
LABEL description="an open source, provenance aware, iterative data cleaning tool"
|
||
|
LABEL website="http://vizierdb.info"
|
||
|
LABEL sourcecode="https://github.com/VizierDB"
|
||
|
LABEL documentation="https://github.com/VizierDB/web-api/wiki"
|
||
|
LABEL tags="CSV,Data Cleaning,Databases,Provenance,Workflow,Machine Learning"
|
||
|
|
||
|
ARG gituser
|
||
|
ARG gitpass
|
||
|
ARG MIMIR_BRANCH=master
|
||
|
ARG MIMIR_XARGS
|
||
|
ARG MIMIR_ARGS
|
||
|
|
||
|
ENV RUN_SSH=true
|
||
|
ENV PULL_MIMIR=true
|
||
|
ENV RESTORE_BACKUP=true
|
||
|
ENV NEW_MIMIR_DB_FROM_S3=true
|
||
|
ENV NEW_HIVE_METASTORE_FROM_S3=true
|
||
|
|
||
|
EXPOSE 33388
|
||
|
EXPOSE 22
|
||
|
|
||
|
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
||
|
&& apk add --update \
|
||
|
build-base alpine-sdk \
|
||
|
fuse fuse-dev \
|
||
|
automake autoconf git \
|
||
|
libressl-dev \
|
||
|
curl-dev libxml2-dev \
|
||
|
ca-certificates \
|
||
|
bash \
|
||
|
git \
|
||
|
curl \
|
||
|
sed \
|
||
|
openssh \
|
||
|
supervisor \
|
||
|
&& rm /var/cache/apk/* \
|
||
|
&& mkdir -p /usr/local/source/web-api/.vizierdb
|
||
|
|
||
|
ENV IAM_ROLE=none
|
||
|
ENV AWS_ACCESS_KEY_ID=value
|
||
|
ENV AWS_SECRET_ACCESS_KEY=value
|
||
|
ENV USE_S3_VOLUME=true
|
||
|
ENV S3_ENDPOINT=
|
||
|
ENV S3A_ENDPOINT="https://s3.vizier.app/"
|
||
|
ENV S3_BUCKET_ACL=private
|
||
|
ENV S3_BUCKET_NAME=none
|
||
|
ENV MOUNT_POINT=/usr/local/source/web-api/.vizierdb
|
||
|
|
||
|
ARG S3FS_VERSION=v1.82
|
||
|
|
||
|
RUN git clone https://github.com/s3fs-fuse/s3fs-fuse.git && \
|
||
|
cd s3fs-fuse \
|
||
|
git checkout tags/${S3FS_VERSION} && \
|
||
|
./autogen.sh && \
|
||
|
./configure --prefix=/usr && \
|
||
|
make && \
|
||
|
make install
|
||
|
|
||
|
RUN s3fs --version
|
||
|
|
||
|
#setup ssh
|
||
|
RUN echo 'root:odinlab' |chpasswd
|
||
|
RUN sed -ri 's/^#?PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config \
|
||
|
&& sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config \
|
||
|
&& ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa \
|
||
|
&& ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa \
|
||
|
&& ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa \
|
||
|
&& ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t ed25519
|
||
|
|
||
|
#setup mimir
|
||
|
RUN curl -sL "https://github.com/sbt/sbt/releases/download/v0.13.15/sbt-0.13.15.tgz" | gunzip | tar -x -C /usr/local/source/ \
|
||
|
&& chmod 0755 /usr/local/source/sbt/bin/sbt \
|
||
|
&& git clone https://github.com/UBOdin/mimir.git /usr/local/source/mimir \
|
||
|
&& cd /usr/local/source/mimir \
|
||
|
&& git checkout -b local_$MIMIR_BRANCH origin/$MIMIR_BRANCH \
|
||
|
&& /usr/local/source/sbt/bin/sbt publish
|
||
|
|
||
|
COPY run_init.sh /usr/local/source/run_init.sh
|
||
|
COPY run_mimir.sh /usr/local/source/run_mimir.sh
|
||
|
COPY entrypoint.sh /usr/local/source/entrypoint.sh
|
||
|
COPY supervisord.conf /etc/supervisord.conf
|
||
|
|
||
|
RUN chmod +x /usr/local/source/run_init.sh \
|
||
|
/usr/local/source/run_mimir.sh \
|
||
|
/usr/local/source/entrypoint.sh
|
||
|
|
||
|
ENTRYPOINT ["\/bin\/bash", "-c", "/usr/local/source/entrypoint.sh"]
|