Skip to content

Commit d62c72d

Browse files
committed
docker: Update mirageos image
Summary: The docker base image switched to ocaml 4.14.3, and also the cross-compiler (ocaml-solo5) wants 4.14.3. But in the pinned opam-repository of 26.3.2024, there is no 4.14.3, only 4.14.2. Therefore update the stack to make everything work again. Thanks to Hannes Mehnert for the patch! Also update GHA actions to get rid of deprecated messages and push package iff on main branch (not devel). Reviewers: #muen, ken Reviewed By: #muen, ken Subscribers: ken Differential Revision: https://dev.codelabs.ch/D1406
2 parents ccbe7c7 + 1984778 commit d62c72d

2 files changed

Lines changed: 14 additions & 20 deletions

File tree

.github/workflows/mirageos.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout repository
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v6
1616
- name: Cache Docker layers
17-
uses: actions/cache@v4
17+
uses: actions/cache@v5
1818
with:
1919
path: /tmp/.buildx-cache
2020
key: ${{ runner.os }}-buildx-${{ github.sha }}
@@ -39,7 +39,7 @@ jobs:
3939
context: .
4040
file: ./docker/Dockerfile.muen-mirageos
4141
platforms: linux/amd64
42-
push: ${{ github.ref == 'refs/heads/devel' }}
42+
push: ${{ github.ref == 'refs/heads/main' }}
4343
cache-from: type=local,src=/tmp/.buildx-cache
4444
cache-to: type=local,dest=/tmp/.buildx-cache
4545
tags: |

docker/Dockerfile.muen-mirageos

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,33 @@
1-
FROM ocaml/opam:debian-12-ocaml-4.14
1+
FROM ocaml/opam@sha256:3392c09686e089098aec8ec48243271758738c768dd0faadef30caaf1d238071
22

33
LABEL maintainer="Reto Buerki <reet@codelabs.ch>"
44
LABEL description="Build environment for Muen-enabled MirageOS/Solo5 Unipi website unikernel"
55

66
USER root
7-
RUN curl -SL https://github.com/ocaml/opam/releases/download/2.1.5/opam-2.1.5-x86_64-linux -o $(which opam) \
8-
&& chmod 755 $(which opam)
7+
RUN mv /usr/bin/opam-2.5 /usr/bin/opam
98
USER opam
109

11-
RUN git clone https://github.com/Solo5/solo5.git \
12-
&& git -C solo5 reset --hard dabc69fd89b8119449ec4088c54b458d4ccc851b
13-
1410
RUN cd /home/opam/opam-repository \
1511
&& git fetch origin master \
16-
&& git reset --hard 6d17c11f6930230daaef6a30d13bc23c1597fc9f \
12+
&& git reset --hard 493123878a032e3f829b102f34e8690b3b2a4fd4 \
1713
&& opam update \
18-
&& opam pin add solo5 $HOME/solo5 \
19-
&& opam install -y mirage.4.4.2
14+
&& opam install -y solo5.0.10.1 mirage.4.11.0 ocaml-solo5
2015

2116
# clone mirage-skeleton and prepare dependencies.
22-
# the settings are as described in the muen.sk article.
23-
RUN git clone https://github.com/mirage/mirage-skeleton \
17+
RUN git clone -b codelabs https://github.com/codelabs-ch/mirage-skeleton \
2418
&& cd mirage-skeleton/applications/static_website_tls \
25-
&& git reset --hard c7841e2796270c3114cbff932e3f7a0ff86b62c4 \
19+
&& git reset --hard 6dbd88712b0f81ebef9bfdcec9e1ace48284bd19 \
2620
&& eval $(opam env) \
27-
&& mirage configure -t muen --ipv4=192.168.254.10/24 --ipv4-gateway=192.168.254.1 \
21+
&& mirage configure -t muen \
2822
&& make \
2923
&& mv dist/https.muen $HOME/
3024

31-
# clone unipi and perpare dependencies.
32-
RUN git clone -b with-kv-mirage4 https://github.com/roburio/unipi.git \
25+
# clone unipi and prepare dependencies.
26+
RUN git clone -b with-kv-mirage411 https://github.com/roburio/unipi.git \
3327
&& cd unipi \
34-
&& git reset --hard 90dd597b41aee0162cdc75d87a1ce3ca415bef55 \
28+
&& git reset --hard 3b019c413be79c5acde6628ad5e0f85022eec6c9 \
3529
&& eval $(opam env) \
36-
&& mirage configure -t muen --ipv4=192.168.254.10/24 --ipv4-gateway=192.168.254.1 \
30+
&& mirage configure -t muen \
3731
&& make
3832

3933
CMD [ "bash" ]

0 commit comments

Comments
 (0)