Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
docker
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
hepsw
docker
Commits
6895348d
Commit
6895348d
authored
Jan 10, 2020
by
Marian Heil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docker with clang & ubuntu
parent
e5d2b553
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
0 deletions
+66
-0
Docker_clang
Docker_clang
+66
-0
No files found.
Docker_clang
0 → 100644
View file @
6895348d
FROM ubuntu AS base
LABEL name "compilerenv"
# Ubuntu:
RUN apt-get -y update && apt-get -y install tar wget file cmake deltarpm make \
python python-dev git autoconf libtool libgsl-dev zlib1g-dev libstdc++-7-dev \
libtinfo-dev && apt-get -y clean
# installing tzdata needs timezone
RUN export DEBIAN_FRONTEND=noninteractive && apt-get -y install tzdata \
&& ln -fs /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime \
&& dpkg-reconfigure --frontend noninteractive tzdata && apt-get -y clean
RUN ln -s $(which cmake) /usr/bin/cmake3
# Fedora:
# RUN yum -y update && yum -y install tar wget file which cmake3 deltarpm make \
# python2 python2-devel git autoconf libtool gsl-devel zlib-devel libstdc++-devel \
# tzdata && yum -y clean all
ENV MAIN_PREFIX /cvmfs/pheno.egi.eu/HEJ
COPY .bash_profile /root/.bash_profile
COPY .bashrc /root/.bashrc
COPY main_env.sh $MAIN_PREFIX/main_env.sh
ENV CLANG_PREFIX $MAIN_PREFIX/clang_9
# Build docker
FROM base AS builder
# Ubuntu:
RUN . /root/.bashrc \
&& apt-get -y install bzip2 tcl expect dejagnu binutils xz-utils build-essential
# Fedora:
# RUN . /root/.bashrc \
# && yum -y install bzip2 tcl expect dejagnu binutils
ENV T_CLANG_VERSION 9.0.0
ENV T_CLANG_NAME clang+llvm-${T_CLANG_VERSION}-x86_64-linux-gnu-ubuntu-18.04
ENV LANG C.UTF-8
# Install clang
WORKDIR $CLANG_PREFIX
RUN wget -O- http://releases.llvm.org/${T_CLANG_VERSION}/${T_CLANG_NAME}.tar.xz | \
tar xJ -C . && mv ${T_CLANG_NAME}/* . && rm -rf ${T_CLANG_NAME}
ENV CC $CLANG_PREFIX/bin/clang
ENV CXX $CLANG_PREFIX/bin/clang++
ENV PATH $CLANG_PREFIX/bin:$PATH
ENV LD_LIBRARY_PATH $CLANG_PREFIX/lib64:$CLANG_PREFIX/lib
# create env. file
WORKDIR $CLANG_PREFIX
COPY gccenv.sh $CLANG_PREFIX/clangenv.sh
RUN . /root/.bashrc && sed -i -e "s GCC CLANG g" clangenv.sh
RUN . /root/.bashrc && sed -i -e "s gcc clang g" clangenv.sh
RUN . /root/.bashrc && sed -i -e "s g++ clang++ g" clangenv.sh
RUN . /root/.bashrc && sed -i -e "s CLANG_PREFIX ${CLANG_PREFIX} g" clangenv.sh
RUN . /root/.bashrc && printf 'source '$CLANG_PREFIX'/clangenv.sh\n' >> $MAIN_PREFIX/main_env.sh
# Final docker
FROM base
ENV CC $CLANG_PREFIX/bin/clang
ENV CXX $CLANG_PREFIX/bin/clang++
ENV PATH $CLANG_PREFIX/bin:$PATH
ENV LD_LIBRARY_PATH $CLANG_PREFIX/lib64:$CLANG_PREFIX/lib
COPY --from=builder $CLANG_PREFIX $CLANG_PREFIX
COPY --from=builder $MAIN_PREFIX/main_env.sh $MAIN_PREFIX/main_env.sh
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment