Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Nov 8, 2023
1 parent 550b06f commit 34ff751
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
push: true
push: false
tags: ${{ secrets.REGISTRY }}/${{ secrets.SERVICE_NAME }}:latest
cache-from: type=registry,ref=${{ secrets.REGISTRY }}/${{ secrets.SERVICE_NAME }}:buildcache
cache-to: type=registry,ref=${{ secrets.REGISTRY }}/${{ secrets.SERVICE_NAME }}:buildcache,mode=max
cache-from: type=gha
cache-to: type=gha,mode=max
29 changes: 11 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
ARG DISTRO=debian
ARG DISTRO_VERSION=bookworm-slim

FROM ${DISTRO}:${DISTRO_VERSION}
FROM debian:bookworm-slim

# ARG DEBIAN_FRONTEND=noninteractive

RUN <<EOF
set -eux
apt-get update
# apt-get upgrade -y
apt-get install -y build-essential software-properties-common cmake git # wget
apt-get install -y build-essential cmake git # wget software-properties-common
# apt-get install -y libssl-dev libffi-dev libbz2-dev libncurses-dev libncursesw5-dev libgdbm-dev liblzma-dev libsqlite3-dev tk-dev libgdbm-compat-dev libreadline-dev
EOF

Expand All @@ -27,17 +24,13 @@ EOF

#COPY --from=python:3.11-slim-bullseye /usr/local/bin /usr/local/bin

COPY --from=node:20-${DISTRO_VERSION} /usr/local/bin/node /usr/local/bin/node
COPY --from=node:20-${DISTRO_VERSION} /usr/local/include/node /usr/local/include/node
COPY --from=node:20-${DISTRO_VERSION} /usr/local/lib/node_modules /usr/local/lib/node_modules

COPY --from=python:-${DISTRO_VERSION} /usr/local/bin/python3 /usr/local/bin/python3
COPY --from=python-${DISTRO_VERSION} /usr/local/bin/python3.11 /usr/local/bin/python3.11
COPY --from=python-${DISTRO_VERSION} /usr/local/bin/python /usr/local/bin/python
COPY --from=node:20-bookworm /usr/local/bin/node /usr/local/bin/node
COPY --from=node:20-bookworm /usr/local/include/node /usr/local/include/node
COPY --from=node:20-bookworm /usr/local/lib/node_modules /usr/local/lib/node_modules

COPY --from=python-${DISTRO_VERSION} /usr/local/lib/python3.8 /usr/local/lib/python3.8
COPY --from=python-${DISTRO_VERSION} /usr/local/lib/libpython3.11.so.1.0 /usr/local/lib/libpython3.11.so.1.0
COPY --from=python-${DISTRO_VERSION} /usr/local/lib/libpython3.so /usr/local/lib/libpython3.so
COPY --from=python:3.11-bookworm /usr/local/bin/python3 /usr/local/bin/python3
COPY --from=python:3.11-bookworm /usr/local/lib/python3.11 /usr/local/lib/python3.11
COPY --from=python:3.11-bookworm /usr/local/lib/libpython3.11.so.1.0 /usr/local/lib/libpython3.11.so.1.0


# WORKDIR /opt/node
Expand All @@ -52,8 +45,8 @@ COPY --from=python-${DISTRO_VERSION} /usr/local/lib/libpython3.so /usr/local/lib

# RUN rm -rf /opt/node

COPY --from=node:20-slim /usr/local/bin /usr/local/bin
COPY --from=node:20-slim /usr/local/lib/node_modules /usr/local/lib/node_modules
# COPY --from=node:20-slim /usr/local/bin /usr/local/bin
# COPY --from=node:20-slim /usr/local/lib/node_modules /usr/local/lib/node_modules

RUN <<-EOF
set -eux
Expand All @@ -79,7 +72,7 @@ RUN <<EOF
set -eux
conan install .. --output-folder=. --build=missing --profile=webassembly --settings compiler.cppstd=20 --settings build_type=Release
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
# cmake --build . --config Release
cmake --build . --config Release
EOF

# FROM golang:1.21
Expand Down

0 comments on commit 34ff751

Please sign in to comment.