1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-03 23:23:03 +00:00
Files
Interlisp.maiko/.github/workflows/Dockerfile_maiko

40 lines
1.4 KiB
Plaintext
Executable File

#*******************************************************************************
#
# Dockerfile to build Maiko for Linux to be used by buildRelease github action
# The output of this is intended to be a directory in the github workspace
# file system it is not intended to be a useable Docker image.
#
# Copyright 2023 by Interlisp.org
#
# Frank Halasz 2023-02-21
#
# ******************************************************************************
FROM ghcr.io/interlisp/maiko-builder
ARG INSTALL_LOCATION=/usr/local/interlisp/maiko
SHELL ["/bin/bash", "-c"]
# Copy over / clean maiko repo
COPY . ${INSTALL_LOCATION}
# Build maiko
RUN cd ${INSTALL_LOCATION}/bin \
&& ./makeright x cleanup \
&& ./makeright x \
&& if [ "$(./machinetype)" = "x86_64" ]; then \
./makeright init; \
fi
# Build specially for WSL1 by "fooling" a linux build
RUN cd ${INSTALL_LOCATION}/bin \
&& arch="$(./machinetype)" \
&& if [ "$arch" = "x86_64" ] || [ "$arch" = "aarch64" ]; then \
mv osversion oserversion.hold \
&& echo "#!/bin/sh" > osversion \
&& echo "echo wsl1" >> osversion \
&& chmod ugo+x osversion \
&& ./makeright x cleanup \
&& ./makeright x \
&& ./makeright init \
&& mv osversion.hold osversion \
&& chmod ugo+x osversion \
; \
fi