-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (37 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
FROM ubuntu:22.04
ENV VERSION "0.0.0"
ENV LONG_MESSAGE "ROSbot 2R"
ENV SHORT_MESSAGE "ROSbot;2R"
# Install ASCII text creator, debian package manager and python
RUN apt update \
&& apt install -y \
figlet \
dpkg \
python3 \
python3-pip
RUN pip3 install pyyaml
# Create file tree
RUN mkdir package_dir \
&& mkdir -p package_dir/DEBIAN \
&& mkdir -p package_dir/etc \
&& mkdir -p package_dir/etc/profile.d/ \
&& mkdir -p package_dir/usr \
&& mkdir -p package_dir/usr/bin
# Package info
COPY ./husarion_motd/deb_pkg/control control.base
# First install script
COPY ./husarion_motd/deb_pkg/postinst package_dir/DEBIAN/postinst
RUN chmod a+x package_dir/DEBIAN/postinst
# Script execution
COPY ./husarion_motd/deb_pkg/husarion-motd.sh package_dir/etc/profile.d/husarion-motd.sh
RUN chmod a+x package_dir/etc/profile.d/husarion-motd.sh
# Copy husarion logo
COPY ./husarion_motd/src/husarion_logo.txt package_dir/usr/bin/husarion_logo.txt
# Setup motod script
COPY ./husarion_motd/src/husarion_motd.py ./husarion-motd.base
RUN chmod a+x ./husarion-motd.base
RUN mkdir output
COPY ./husarion_motd/scripts/build_package.sh ./build_package.sh
COPY ./husarion_motd/scripts/build_platforms.py ./build_platforms.py
# Copy platforms to build
COPY ./platforms.yaml ./platforms.yaml