Skip to content

Commit

Permalink
try and fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGibb committed Jul 7, 2024
1 parent f348b9f commit ee2c280
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/scripts/depexts/generate-actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ EOF
cat >$dir/Dockerfile << EOF
FROM nixos/nix
RUN nix-channel --update
RUN nix-env -i gnum4 git rsync patch gnutar bzip2 gnumake wget ocamlPackages.ocaml ocamlPackages.ocaml-compiler-libs
EOF
esac

Expand All @@ -121,9 +120,17 @@ ENV OPAMCONFIRMLEVEL unsafe-yes
ENV OPAMPRECISETRACKING 1
COPY opam /usr/bin/opam
COPY entrypoint.sh /opam/entrypoint.sh
ENTRYPOINT ["/opam/entrypoint.sh"]
EOF

if [ "$target" != "nix" ]; then
cat >>$dir/Dockerfile << EOF
ENTRYPOINT ["/opam/entrypoint.sh"]
EOF
else
cat >>$dir/Dockerfile << EOF
ENTRYPOINT ["nix-shell", "-p", "gnum4", "git", "rsync", "patch", "gnutar", "bzip2", "gnumake", "wget", "ocamlPackages.ocaml", "ocamlPackages.ocaml-compiler-libs", "--run", "/opam/entrypoint.sh"]
EOF
fi

### Generate the entrypoint
cat >$dir/entrypoint.sh << EOF
Expand Down

0 comments on commit ee2c280

Please sign in to comment.