Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*Dockerfile


README.md
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,22 @@ git submodule update --init

### Building the docker image

#### Centos 7

```
docker build -t alma/acs .
docker build -t acscommunity/acs:2020.08.0-centos7-latest -t acscommunity/acs:2020.08.0-centos7 -f centos-7.Dockerfile .
```

#### Centos 8

```
docker build -t acscommunity/acs -f centos-8.Dockerfile .
```

## Deployment

```
docker run --rm -it --name=acs alma/acs
docker run --rm -it --name=acs acscommunity/acs
```

If you want to compile your ACS module inside the docker container, create a docker volume that binds the path of your machine into a folder called `/test` for example:
Expand All @@ -75,7 +82,7 @@ If you want to compile your ACS module inside the docker container, create a doc
docker run --rm -it \
-v $PWD:/test \
-w /test \
alma/acs
acscommunity/acs
```

If you need to receive the graphical interface from the container:
Expand All @@ -87,7 +94,7 @@ docker run --rm -it \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-v $PWD:/test \
-w /test \
alma/acs
acscommunity/acs
```

## Contributing
Expand Down
103 changes: 103 additions & 0 deletions centos-7.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
FROM centos:7 AS base

ENV ACS_PREFIX=/alma ACS_TAG="2020AUG" ACS_VERSION="2020.8"

ENV ACS_ROOT="${ACS_PREFIX}/ACS-${ACS_TAG}"

ENV JAVA_HOME="/usr/java/default"

# The package list below is alphabetically sorted, so not sorted by importance.
# It may very well be, that noe all packages are actually needed.
# If you studied this, and found out we can shorten this list without loosing
# the ability to execute all the ACS examples, we'd be happy to hear from you
# either by opening an issue, or by you immediately fixing this and opening a
# pull request.
RUN yum install -y \
bison \
bzip2 \
bzip2-devel \
dos2unix \
epel-release \
expat-devel \
file \
flex \
freetype-devel \
gcc \
gcc-c++ \
gcc-gfortran \
git \
java-11-openjdk \
java-11-openjdk-devel \
libffi \
libffi-devel \
libX11-devel \
libxml2-devel \
libxslt-devel \
make \
net-tools \
openldap-devel \
openssl-devel \
perl \
procmail \
python2-pip \
python3-pip \
readline-devel \
redhat-lsb-core \
rpm-build \
sqlite-devel \
tcl-devel \
tk-devel \
xauth && \
yum clean all && \
# Prepare Java
mkdir -pv /usr/java && \
ln -sv /usr/lib/jvm/java-openjdk $JAVA_HOME && \
echo "source $ACS_ROOT/ACSSW/config/.acs/.bash_profile.acs" >> /etc/bashrc

# ============= Compiler Stage ===============================================
FROM base AS dependency_builder

COPY acs/ /acs

COPY acs-patches/ /tmp
RUN yum -y install autoconf \
curl \
git-lfs \
ksh \
mc \
nc \
patch \
# Needed by buildJacOrb
rsync \
screen \
subversion \
tree \
unzip \
vim \
wget \
xterm && \
cd /acs/ExtProd/PRODUCTS && \
# some versions for python dependencies have changed.
# Also we removed the *bulkDataNT* and *bulkData* modules from the Makefile
# as we don't have the properietary version of DDS and don't use this modules.
sed -i 's/bulkDataNT bulkData //g' /acs/Makefile && \
cd /acs/ExtProd/INSTALL && \
patch -p1 -d /acs < /tmp/python-module-installation.patch && \
source /acs/LGPL/acsBUILD/config/.acs/.bash_profile.acs && \
time MAKE_NOSTATIC=1 OPTIMIZE=3 make -C /acs/ExtProd/INSTALL all && \
find /alma -name "*.o" -exec rm -v {} \;
# --------------------- Here external dependencies are built --------------

FROM dependency_builder as acs_builder

RUN cd /acs/ && \
source /acs/LGPL/acsBUILD/config/.acs/.bash_profile.acs && \
time MAKE_NOSTATIC=1 OPTIMIZE=3 MAKE_PARS="-j $(nproc)" make build && \
find $ACS_ROOT -name "*.o" -exec rm {} \; && \
find $ACS_ROOT -type f -executable |grep -v "/pyenv/" | xargs file | grep ELF | awk '{print $1}' | tr -d ':' | xargs strip --strip-unneeded
# ============= Target image stage ===========================================
FROM base

WORKDIR /

COPY --from=acs_builder /alma /alma
File renamed without changes.