forked from stegm/marvell_msu_docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
47 lines (31 loc) · 1.48 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
FROM alpine:3 AS download_package
# Online download of package
RUN apk add --no-cache wget && \
wget --quiet https://download.lenovo.com/servers/mig/2019/04/11/19912/mrvl_utl_msu_4.1.10.2046_linux_x86-64.tgz
# Offline install of marvel package - download https://download.lenovo.com/servers/mig/2019/04/11/19912/mrvl_utl_msu_4.1.10.2046_linux_x86-64.tgz
# and place it in the Dockerfile directory
#COPY mrvl_utl_msu_4.1.10.2046_linux_x86-64.tgz ./
RUN tar xzf mrvl_utl_msu_4.1.10.2046_linux_x86-64.tgz
FROM fedora:31 AS final
# libxcrypt-compat, libnsl: apache webserver for MSU
# procps: install script
RUN yum install -y \
libxcrypt-compat \
libnsl \
procps \
dash
COPY --from=download_package mrvl_utl_msu_4.1.10.2046_linux_x86-64/MSU-4.1.10.2046-1.x86_64.rpm ./
RUN yum install -y MSU-4.1.10.2046-1.x86_64.rpm
# redirect config db.xml
RUN mv /opt/marvell/storage/db/db.xml /opt/marvell/storage/db/db.xml.orig && \
ln -s /etc/marvell/db.xml /opt/marvell/storage/db/db.xml
# redirect logs from raid controller
RUN rm /opt/marvell/storage/db/mvraidsvc.log && \
ln -s /dev/stdout /opt/marvell/storage/db/mvraidsvc.log
# redirect apache logs
RUN sed -ie 's:CustomLog "logs/access_log":CustomLog "/proc/self/fd/1":' /opt/marvell/storage/apache2/conf/httpd.conf && \
sed -ie 's:ErrorLog "logs/error_log":ErrorLog "/proc/self/fd/2":' /opt/marvell/storage/apache2/conf/httpd.conf
COPY scripts/startup.sh /startup.sh
EXPOSE 8845/tcp
VOLUME ["/dev", "/etc/marvell"]
ENTRYPOINT ["/startup.sh"]