-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.run-ubuntu
More file actions
51 lines (43 loc) · 1.58 KB
/
Copy pathDockerfile.run-ubuntu
File metadata and controls
51 lines (43 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
ARG BASE_IMAGE=ubuntu:22.04
FROM ${BASE_IMAGE}
ARG USER_ID=1000
ENV DEBIAN_FRONTEND=noninteractive
# Install base packages. lsb-release provides the lsb_release command Vivado
# calls on every supported release. libtinfo5 (needed by Vivado) was dropped
# after 22.04; on >= 24.04 install libtinfo6 and add a libtinfo.so.5
# compatibility symlink instead.
RUN . /etc/os-release && \
apt-get update -qq && \
PKGS="build-essential ca-certificates pkg-config git rsync bash cmake ninja-build \
locales locales-all libc6-dev-i386 libglib2.0-0 libsm6 libxext6 libxrender-dev libpixman-1-0 lsb-release" && \
if dpkg --compare-versions "$VERSION_ID" ge 24.04; then \
PKGS="$PKGS libtinfo6"; \
else \
PKGS="$PKGS libtinfo5"; \
fi && \
apt-get install -y --no-install-recommends $PKGS && \
if dpkg --compare-versions "$VERSION_ID" ge 24.04; then \
ln -sf libtinfo.so.6 /usr/lib/x86_64-linux-gnu/libtinfo.so.5; \
fi
COPY deb/*.deb /tmp
RUN apt install -y /tmp/slash-dev_*.deb \
/tmp/slash-sim-emu-dev_*.deb \
/tmp/slash-sim-emu_*.deb \
/tmp/slashkit_*.deb \
/tmp/libslash-dev_*.deb \
/tmp/libslash_*.deb \
/tmp/libvrtd-dev_*.deb \
/tmp/libvrtd_*.deb \
/tmp/libvrt-dev_*.deb \
/tmp/libvrt_*.deb
# Setting timezone and locale for Vivado
ARG TZ
ENV TZ=${TZ:-Europe/Dublin}
ENV LC_ALL=en_US.utf-8
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Adding the slash user
RUN if id -u $USER_ID >/dev/null 2>&1; then \
userdel -r $(id -nu $USER_ID); \
fi && \
useradd -m -U -u $USER_ID slash
USER slash