-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
51 lines (45 loc) · 1.3 KB
/
Dockerfile
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
#
# Copyright (c) 2020-2024 IAR Systems AB
#
# Dockerfile for the IAR Build Tools (BX)
#
# See LICENSE for detailed license information
#
#
# The base layer for the bx-docker image
# - 2022Q3+ toolchain: Ubuntu 20.04 (*default)
# - earlier toolchain: Ubuntu 18.04
#
FROM ubuntu:20.04
#
# Environment variables
# bx-docker - issue #22 - starting from bxarm-9.30.1, iarbuild tries to create $HOME/.iar.
# For the Ubuntu 20.04 container, $HOME must be manually set.
#
ENV LC_ALL=C \
DEBIAN_FRONTEND="noninteractive" \
HOME=/build
#
# Allows specific image name to be copied from the Docker context
#
ARG BX_PACKAGE_DEB=bx*.deb
#
# Copy the installer package from the Docker context to /tmp
#
COPY ${BX_PACKAGE_DEB} /tmp
#
# Install the necessary packages and cleanup
# sudo : required by earlier versions of bx*.deb
# libsqlite3-0 : required by iarbuild
# libxml2, tzdata : required by C-STAT
# git : added for convenience
#
RUN apt-get update && \
apt-get install -y sudo libsqlite3-0 libxml2 tzdata git && \
apt-get install -y /tmp/bx*.deb && \
apt-get clean autoclean autoremove && \
rm -rf /var/lib/apt/lists/* /tmp/*.deb
#
# Set the default Working directory for the image
#
WORKDIR ${HOME}