@@ -11,7 +11,6 @@ COPY vendor/ vendor/
1111COPY go.mod go.sum ./
1212COPY pkg/ pkg/
1313COPY cmd/ cmd/
14- COPY proto/ proto/
1514RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -mod=vendor -o xfuncjs-server cmd/server/main.go
1615
1716FROM node:$NODE_VERSION AS js-builder
@@ -25,10 +24,10 @@ COPY --chown=1000:1000 .yarn /app/.yarn
2524# RUN corepack enable
2625# Instead of using corepack enable, we'll create a yarn wrapper script that uses the first file in .yarn/releases
2726RUN YARN_PATH=$(find /app/.yarn/releases -type f -name "yarn-*.cjs" | sort | head -1) && \
28- echo '#!/bin/sh' > /usr/local/bin/yarn && \
29- echo "exec $(which node) $YARN_PATH \"\$ @\" " >> /usr/local/bin/yarn && \
30- chmod +x /usr/local/bin/yarn && \
31- chown -R 1000:1000 /app
27+ echo '#!/bin/sh' > /usr/local/bin/yarn && \
28+ echo "exec $(which node) $YARN_PATH \"\$ @\" " >> /usr/local/bin/yarn && \
29+ chmod +x /usr/local/bin/yarn && \
30+ chown -R 1000:1000 /app
3231
3332USER 1000
3433WORKDIR /app
@@ -47,15 +46,15 @@ RUN yarn workspaces focus @crossplane-js/server @crossplane-js/sdk --production
4746USER root
4847SHELL ["/bin/ash" , "-o" , "pipefail" , "-c" ]
4948RUN mkdir -p /dependencies/lib /dependencies/usr/lib && \
50- ldd /app/packages/server/build/xfuncjs-server-js | awk '{print $3}' | grep -vE '^$' | while read -r lib; do \
51- if [ -f "$lib" ]; then \
52- if [ "${lib#/usr/lib/}" != "$lib" ]; then \
53- cp "$lib" /dependencies/usr/lib/; \
54- elif [ "${lib#/lib/}" != "$lib" ]; then \
55- cp "$lib" /dependencies/lib/; \
56- fi; \
57- fi; \
58- done
49+ ldd /app/packages/server/build/xfuncjs-server-js | awk '{print $3}' | grep -vE '^$' | while read -r lib; do \
50+ if [ -f "$lib" ]; then \
51+ if [ "${lib#/usr/lib/}" != "$lib" ]; then \
52+ cp "$lib" /dependencies/usr/lib/; \
53+ elif [ "${lib#/lib/}" != "$lib" ]; then \
54+ cp "$lib" /dependencies/lib/; \
55+ fi; \
56+ fi; \
57+ done
5958
6059
6160FROM alpine:3 AS certs
0 commit comments