Skip to content

Commit

Permalink
change binary locations and set permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
dshiell committed Sep 6, 2024
1 parent 92e6a19 commit f5ea0ee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ FROM alpine:3.18
WORKDIR /root/

# Copy the binaries from the builder stage
COPY --from=builder /app/erpc-server .
COPY --from=builder /app/erpc-server-pprof .
COPY --from=builder /app/erpc-server /usr/bin/erpc-server
COPY --from=builder /app/erpc-server-pprof /usr/bin/erpc-server-pprof

RUN chmod 777 /usr/bin/erpc-server*

# 8080 -> erpc
# 6060 -> pprof (optional)
Expand All @@ -40,4 +42,4 @@ EXPOSE 8080 6060
ENV PPROF=false

# Run the appropriate binary based on the environment variable
CMD if [ "$PPROF" = "true" ]; then ./erpc-server-pprof; else ./erpc-server; fi
CMD if [ "$PPROF" = "true" ]; then /usr/bin/erpc-server-pprof; else /usr/bin/erpc-server; fi

0 comments on commit f5ea0ee

Please sign in to comment.