Skip to content

Commit

Permalink
change VCS's base image to Ubuntu 16.04
Browse files Browse the repository at this point in the history
** TODOs
* future VCS version could be compatible with latest OSes
* remove x86 related VCS files to reduce image size
* make 'vcs' command always comes with '-full64' option
  - 'VCS_TARGET_ARCH' option with 'amd64' was not effective
* use actually required packages rather than 'build-essential' metapackage
  • Loading branch information
limerainne committed Jan 8, 2019
1 parent eb9e553 commit 35dcaa4
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions Dockerfile_Synopsys_VCS
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# TODO hmm... VCS did not operates smoothly in native Ubuntu 17.04/10... OK for 16.04

FROM ubuntu:18.04 AS installer
# Synopsys VCS cannot be executed in Ubuntu 18.04 & VCS N-2017.12
# - in generating binary stage, 'undefined symbol relocation' error in g++ happened...
#
# TODO with latest version, we can use more recent Ubuntu image, which reduces docker image size
# TODO remove x86 related files in VCS (almost 3 GiB) to reduce image size
# TODO how to make 'vcs' always have '-full64' option?
# TODO rather than 'build-essential' metapackage, use lighter and essential packages to compile simulation binary

FROM ubuntu:16.04 AS installer
ARG repo_sed=s#://archive.ubuntu.com#://kr.archive.ubuntu.com#g

# 'cshell' is required to run the installer
Expand Down Expand Up @@ -32,7 +38,7 @@ RUN mkdir -p ${base_dir} \


# NOTE using multi-stage image build; avoid including installer package in the final image
FROM ubuntu:18.04
FROM ubuntu:16.04
ARG repo_sed=s#://archive.ubuntu.com#://kr.archive.ubuntu.com#g

# install required library to run Synopsys tool and X11 library to show GUI
Expand All @@ -41,24 +47,17 @@ RUN sed -i -e "${repo_sed}" /etc/apt/sources.list \
&& apt-get install -y --no-install-recommends \
csh libxss1 libsm6 libice6 libxft2 libjpeg62 libtiff5 libmng2 \
&& apt-get install -y --no-install-recommends xserver-xorg-video-dummy xserver-xorg-input-void xserver-xorg-core xinit x11-xserver-utils \
&& echo "deb http://security.ubuntu.com/ubuntu xenial-security main" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y -t xenial libpng12-0 \
&& apt-get install -y --no-install-recommends build-essential dc \
&& rm -rf /var/lib/apt/lists/*
# # using somewhat lighter X11 package rather than xorg; 'x11-apps' is not applicable
# ref: https://git.devuan.org/dev1fanboy/Upgrade-Install-Devuan/wikis/minimal-xorg-install
# # WORKAROUND install libpng12-0 package from Xenial, which is removed from Bionic
# ref: https://www.linuxuprising.com/2018/05/fix-libpng12-0-missing-in-ubuntu-1804.html

# WORKAROUND link outdated library filename required from Synopsys tools
# WORKAROUND set default shell as Bash to avoid error from script included in the tool
RUN ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.5 /usr/lib/x86_64-linux-gnu/libtiff.so.3 \
&& ln -s /usr/lib/x86_64-linux-gnu/libmng.so.2 /usr/lib/x86_64-linux-gnu/libmng.so.1 \
&& update-alternatives --install /bin/sh sh /bin/bash 20

# WORKAROUND Ubuntu 18.04 does not have terminfo files in /usr/share/terminfo/
RUN cp -r /lib/terminfo/. /usr/share/terminfo/

# copy actual tool to be run in this image
ARG base_dir=/usr/synopsys
ARG tool=vcs
Expand All @@ -75,5 +74,5 @@ ENV VCS_HOME ${base_dir}/${tool}/${version}
ENV VCS_TARGET_ARCH "amd64"

# default command when running this image
CMD "vcs"
CMD "vcs -full64"

0 comments on commit 35dcaa4

Please sign in to comment.