Skip to content

Commit

Permalink
[playground] fix Dockerfile for new dir structure
Browse files Browse the repository at this point in the history
  • Loading branch information
dangmai committed Feb 18, 2024
1 parent 2aec76d commit d381623
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/playground/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# This Dockerfile is specifically for apex-ast-serializer for the hosted version
# of the playground
# of the playground.
# It needs to be run in the context of the repository root, instead of the
# current directory
FROM eclipse-temurin:17.0.10_7-jdk-jammy as build
COPY . /prettier-plugin-apex
WORKDIR /prettier-plugin-apex/packages/apex-ast-serializer
RUN ./gradlew clean :server:installDist

FROM eclipse-temurin:17.0.10_7-jre-jammy
COPY vendor/apex-ast-serializer/ /opt/apex-ast-serializer
COPY --from=build /prettier-plugin-apex/packages/prettier-plugin-apex/vendor /opt/apex-ast-serializer
RUN echo /opt/apex-ast-serializer/bin/apex-ast-serializer-http -c '$CORS_HOST' -h 0.0.0.0 -p '$PORT' > /opt/apex-ast-serializer.sh
RUN chmod +x /opt/apex-ast-serializer.sh
CMD /opt/apex-ast-serializer.sh

0 comments on commit d381623

Please sign in to comment.