-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.ubuntu
71 lines (62 loc) · 1.87 KB
/
Dockerfile.ubuntu
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
FROM ubuntu:22.04 as base
MAINTAINER lior.dux@develeap.com
LABEL maintainer.description='C Development environment with ceedling, cmock unity, and doxygen'
LABEL ceedling.version=ceedling-0.32.0-d76db35
LABEL unity.version=2.5.4
LABEL cmock.version=2.5.4
LABEL cexception.version=1.3.3
LABEL doxygen.version=v1.9.1
# Install the required packages
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install --yes --no-install-recommends \
ca-certificates \
systemd \
build-essential \
git \
make \
gcc \
gcc-avr \
valgrind \
vim \
bash \
wget \
curl \
libz-dev \
doxygen \
libssl-dev \
libreadline-dev \
zlib1g-dev \
autoconf \
bison \
libyaml-dev \
libreadline-dev \
libncurses5-dev \
libffi-dev \
libgdbm-dev
# Clean the apt cache
RUN apt-get clean &&\
rm -rf /var/cache/apt/archives/* && \
rm -rf /var/lib/apt/lists/*
# Set the timezone on build time
# ARG TZ Asia/Jerusalem
# ENV TZ $TZ
# RUN timedatectl set-timezone $TZ
# Install rbenv-build
RUN curl --fail --silent --show-error --location https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
ENV PATH="$PATH:/root/.rbenv/bin:/root/.rbenv/shims"
# Validate rbenv using rbev-doctor
RUN curl --fail --silent --show-error --location https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-doctor | bash
RUN echo 'eval "$(~/.rbenv/bin/rbenv init -)"' >> /etc/profile.d/rbenv.sh
# Install rbenv and set the desired version
ARG RBENV_VERSION=3.3.0
ENV RBENV_VERSION $RBENV_VERSION
RUN rbenv install $RBENV_VERSION &&\
rbenv global $RBENV_VERSION
# Install ceedling, cmock and unity
COPY ./ceedling-0.32.0-d76db35.gem ceedling-0.32.0-d76db35.gem
RUN gem install constructor deep_merge thor
RUN gem install --local ./ceedling-0.32.0-d76db35.gem
HEALTHCHECK --interval=35s --timeout=4s --retries=2 CMD ceedling version || exit 1
WORKDIR /project
CMD bash