Skip to content

Commit

Permalink
fix: deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylar Simoncelli committed Oct 2, 2024
1 parent 13d38b1 commit acc4d88
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions .github/actions/images/build-and-publish-ecr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,29 @@ runs:
with:
name: partner-chains-node-linux-artifact

- name: Collect Dependencies
run: |
chmod +x ./partner-chains-node-${{ inputs.tag }}-x86_64-linux
ldd ./partner-chains-node-${{ inputs.tag }}-x86_64-linux | awk 'NF == 4 { print $3 }' > deps.txt
tar -czf deps.tgz -T deps.txt
shell: bash

- name: Write Dockerfile
run: |
cat > Dockerfile <<'EOF'
cat > Dockerfile <<EOF
FROM debian:bullseye-slim
COPY deps.tgz /tmp/deps.tgz
RUN tar -C / -xzf /tmp/deps.tgz \
&& rm -rf /tmp/deps.tgz
RUN useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate \
&& mkdir -p /data /substrate/.local/share/partner-chains-node \
&& chown -R substrate:substrate /data /substrate \
&& rm -rf /usr/bin/apt* /usr/bin/dpkg* \
# Install necessary dependencies
RUN apt-get update && apt-get install -y \\
ca-certificates \\
libgcc-s1 \\
libstdc++6 \\
libc6 \\
libssl1.1 \\
zlib1g \\
libgomp1 \\
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate \\
&& mkdir -p /data /substrate/.local/share/partner-chains-node \\
&& chown -R substrate:substrate /data /substrate \\
&& ln -s /data /substrate/.local/share/partner-chains-node
COPY ./partner-chains-node-${{ inputs.tag }}-x86_64-linux /usr/local/bin/partner-chains-node
RUN chown substrate:substrate /usr/local/bin/partner-chains-node \
RUN chown substrate:substrate /usr/local/bin/partner-chains-node \\
&& chmod +x /usr/local/bin/partner-chains-node
USER substrate
Expand Down

0 comments on commit acc4d88

Please sign in to comment.