Skip to content

Commit d8e9f1b

Browse files
committed
fix: Remove VOLUME ["/build"], Use default build-dir in Docker packaging
- as externalizing the build-dir in a volume looks unneeded: if the build-dir is shared, but the container is deleted, the www is deleted as well, and the exercices are rebuilt anyway - and as an extra volume would add more noise (mandating "-v args" tweaks)
1 parent de42043 commit d8e9f1b

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ RUN apk update \
5555
VOLUME ["/repository"]
5656
RUN mkdir -p /sync && chown learn-ocaml:learn-ocaml /sync
5757
VOLUME ["/sync"]
58-
RUN mkdir -p /build && chown learn-ocaml:learn-ocaml /build
59-
VOLUME ["/build"]
6058
EXPOSE 8080
6159
EXPOSE 8443
6260

@@ -81,5 +79,5 @@ ENV OCAMLPATH="/usr/lib"
8179
RUN ln -sf "$opam_switch/lib/vg" "/usr/lib"
8280
RUN ln -sf "$opam_switch/lib/gg" "/usr/lib"
8381

84-
ENTRYPOINT ["dumb-init","/usr/bin/learn-ocaml","--sync-dir=/sync","--repo=/repository","--build-dir=/build"]
82+
ENTRYPOINT ["dumb-init","/usr/bin/learn-ocaml","--sync-dir=/sync","--repo=/repository"]
8583
CMD ["build","serve"]

Dockerfile.test-server

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ RUN apk update \
6161
VOLUME ["/repository"]
6262
RUN mkdir -p /sync && chown learn-ocaml:learn-ocaml /sync
6363
VOLUME ["/sync"]
64-
RUN mkdir -p /build && chown learn-ocaml:learn-ocaml /build
65-
VOLUME ["/build"]
6664
EXPOSE 8080
6765
EXPOSE 8443
6866

@@ -75,5 +73,5 @@ COPY --from=compilation /home/opam/install-prefix /usr
7573
COPY --from=compilation "$opam_switch/bin"/ocaml* "$opam_switch/bin/"
7674
COPY --from=compilation "$opam_switch/lib/ocaml" "$opam_switch/lib/ocaml/"
7775

78-
ENTRYPOINT ["dumb-init","/usr/bin/learn-ocaml","--sync-dir=/sync","--repo=/repository","--build-dir=/build"]
76+
ENTRYPOINT ["dumb-init","/usr/bin/learn-ocaml","--sync-dir=/sync","--repo=/repository"]
7977
CMD ["build","serve"]

0 commit comments

Comments
 (0)