Commit a3b673c7 authored by Sebastien Moretti's avatar Sebastien Moretti
Browse files

Use Ubuntu distrib, less heavier

parent 5b9bd8fa
FROM centos:centos7 AS builder
FROM ubuntu:20.04 AS builder
ARG UCNEBASE_VERSION
ARG BUILD_DATE
......@@ -25,14 +25,11 @@ LABEL org.opencontainers.image.created=$BUILD_DATE
ENV USER=ucnebase
# In a single layer to save time AND space
RUN echo '# OS update' \
&& yum update -y \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -y \
&& echo '# Install OS requirements' \
&& yum install -y perl perl-CGI httpd postfix rsyslog-mysql wget git php-mysqlnd \
&& wget 'https://dev.mysql.com/get/mysql80-community-release-el7-5.noarch.rpm' \
&& rpm -ivh *.rpm \
&& rm -f *.rpm \
&& yum install -y mysql-community-server \
&& grep 'temporary password' /var/log/* \
&& apt-get install -y --no-install-recommends perl libcgi-pm-perl postfix wget git mysql-server apache2 ca-certificates php-mysqlnd \
&& echo 'perl perl-CGI httpd postfix rsyslog-mysql wget git php-mysqlnd' \
&& echo '# Install UCNEbase' \
&& cd /usr/local/ \
&& git clone https://gitlab.sib.swiss/EPD/UCNEbase_web.git UCNEbase_web.git \
......@@ -40,8 +37,10 @@ RUN echo '# OS update' \
&& rm -Rf OLD/ .git* docker/ \
&& echo '# CLEANING' \
&& echo '## So try to remove manually useless stuff' \
&& yum remove -y wget git *-devel gcc \
&& yum clean all \
&& apt remove -y *-dev wget cmake make swig autoconf check gcc g++ gfortran python3* patchelf \
&& apt autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd -g 1001 ${USER} && useradd -r -u 1001 -g ${USER} ${USER}
......
......@@ -4,14 +4,14 @@
# https://developers.redhat.com/blog/2016/03/09/more-about-docker-images-size/
## ucnebase:0.0.1 is the built image target, usually (lowercase) name:version
## ucnebase:0.0.2 is the built image target, usually (lowercase) name:version
## Dockerfile is the Dockerfile, the commands used to build the image
## Dockerfile example: https://github.com/ElmerCSC/elmerfem/blob/devel/docker/elmerice.dockerfile
# https://github.com/ComparativeGenomicsToolkit/cactus/blob/master/Dockerfile
# https://github.com/ComparativeGenomicsToolkit/Comparative-Annotation-Toolkit/blob/master/Dockerfile
# Build Docker image
export UCNEBASE_VERSION=0.0.1
export UCNEBASE_VERSION=0.0.2
docker build -t ucnebase:$UCNEBASE_VERSION --no-cache=true --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') --build-arg UCNEBASE_VERSION=$UCNEBASE_VERSION -f Dockerfile . # 2>&1 >UCNEbase.Dockerfile.log
# List Docker local images (imported or built)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment