Skip to content

Commit

Permalink
Don't fetch before building the switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuihtlauac ALVARADO committed Dec 13, 2024
1 parent 0c2604b commit 41b50ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@ RUN sudo apk -U upgrade --no-cache && sudo apk add --no-cache \
openssl-dev

# Branch freeze was opam-repo HEAD at the time of commit
RUN cd ~/opam-repository && git fetch -q origin master && git reset --hard c45f5bab71d3589f41f9603daca5acad14df0ab0 && opam update
RUN cd ~/opam-repository && git reset --hard c45f5bab71d3589f41f9603daca5acad14df0ab0 && opam update

WORKDIR /home/opam

# Install opam dependencies
COPY --chown=opam ocamlorg.opam .
ENV OPAMRETRIES=0
RUN opam install . --deps-only

# Build project
COPY --chown=opam . .
RUN opam exec -- dune build @install --profile=release

# Launch project in order to generate the package state cache
RUN cd ~/opam-repository && git checkout master && opam update
RUN cd ~/opam-repository && git checkout master && git pull origin master && opam update
ENV OCAMLORG_PKG_STATE_PATH=package.state \
OCAMLORG_REPO_PATH=opam-repository
RUN touch package.state && ./init-cache package.state
Expand Down

0 comments on commit 41b50ff

Please sign in to comment.