File: Dockerfile

package info (click to toggle)
imx-code-signing-tool 3.4.1%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,912 kB
  • sloc: ansic: 10,258; sh: 2,558; python: 391; yacc: 245; makefile: 203; lex: 59
file content (51 lines) | stat: -rw-r--r-- 1,625 bytes parent folder | download
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
# Docker image for compiling CST
FROM ubuntu:20.04

# Allow using a http proxy. It should be passed to docker build command using, eg:
# --build-arg http_proxy=$bamboo_capability_agent_http_proxy
ARG http_proxy
ARG hostUID=1000
ARG hostGID=1000
ARG hostUserName=cst

ENV http_proxy=$http_proxy

RUN dpkg --add-architecture i386

RUN apt-get update && apt-get -y upgrade && apt-get install -y \
    gcc                     \
    make                    \
    git                     \
    byacc                   \
    flex                    \
    mingw-w64               \
    g++-multilib            \
    libssl-dev              \
    libssl-dev:i386         \
    libudev-dev             \
    libudev-dev:i386        \
    libusb-1.0-0-dev        \
    libusb-1.0-0-dev:i386

# Configure User ( use the host user's UID/GID )
RUN groupadd -f -g $hostGID $hostUserName
RUN useradd -g $hostGID -m -s /bin/bash -u $hostUID $hostUserName
USER $hostUserName

# Make sure .bashrc sources user .bash_profile
RUN echo 'alias ll="ls -la"' >> /home/$hostUserName/.bashrc
RUN echo 'if [ -f ~/.bash_profile ]; then' >> /home/$hostUserName/.bashrc
RUN echo '   . ~/.bash_profile' >> /home/$hostUserName/.bashrc
RUN echo 'fi' >> /home/$hostUserName/.bashrc

# Customize the terminal prompt
RUN mkdir /home/$hostUserName/bin
RUN echo 'export PS1="\[\033[01;33m\]<docker> \[\033[01;31m\]\W \[\033[00m\]$ "' >> /home/$hostUserName/.bash_profile

# Log the image creation date
RUN date > /home/$hostUserName/image-creation-date.txt

# Setup a work environment
ENV WORK_DIR /home/$hostUserName/cst/
RUN mkdir -p $WORK_DIR
WORKDIR $WORK_DIR