mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-12 11:12:16 +00:00
Update Docker build (#816)
* Update create-release.yml minor test * Update Dockerfile * Update Dockerfile * Adjust Docker build for openssl-3 * clone recursively inside the action
This commit is contained in:
parent
bc7ea2af2d
commit
3a5f3fcadd
2 changed files with 21 additions and 16 deletions
10
.github/workflows/docker-ubuntu-image.yml
vendored
10
.github/workflows/docker-ubuntu-image.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Docker Ubuntu 20.04 image
|
||||
name: Docker Ubuntu 22.04 image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
@ -12,10 +12,12 @@ env:
|
|||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
@ -35,5 +37,5 @@ jobs:
|
|||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
context: ./docker
|
||||
context: ./
|
||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
|
|
|
@ -1,26 +1,29 @@
|
|||
FROM ubuntu:20.04 as builder
|
||||
FROM ubuntu:22.04 as builder
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake clang-6.0 openssl libssl-dev zlib1g-dev gperf wget git ninja-build libsecp256k1-dev libsodium-dev libmicrohttpd-dev pkg-config && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git ninja-build libsecp256k1-dev libsodium-dev libmicrohttpd-dev pkg-config autoconf automake libtool && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
ENV CC clang-6.0
|
||||
ENV CXX clang++-6.0
|
||||
ENV CC clang
|
||||
ENV CXX clang++
|
||||
ENV CCACHE_DISABLE 1
|
||||
|
||||
WORKDIR /
|
||||
RUN git clone --recursive https://github.com/ton-blockchain/ton
|
||||
RUN mkdir ton
|
||||
WORKDIR /ton
|
||||
|
||||
COPY ./ ./
|
||||
|
||||
RUN mkdir build && \
|
||||
cd build && \
|
||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= -DCMAKE_CXX_FLAGS="-mavx2" .. && \
|
||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= .. && \
|
||||
ninja storage-daemon storage-daemon-cli tonlibjson fift func validator-engine validator-engine-console generate-random-id dht-server lite-client
|
||||
|
||||
FROM ubuntu:20.04
|
||||
FROM ubuntu:22.04
|
||||
RUN apt-get update && \
|
||||
apt-get install -y openssl wget libatomic1 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
apt-get install -y wget libatomic1 openssl libsecp256k1-dev libsodium-dev libmicrohttpd-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /var/ton-work/db && \
|
||||
mkdir -p /var/ton-work/db/static
|
||||
mkdir -p /var/ton-work/db/static
|
||||
|
||||
COPY --from=builder /ton/build/storage/storage-daemon/storage-daemon /usr/local/bin/
|
||||
COPY --from=builder /ton/build/storage/storage-daemon/storage-daemon-cli /usr/local/bin/
|
||||
|
@ -30,7 +33,7 @@ COPY --from=builder /ton/build/validator-engine-console/validator-engine-console
|
|||
COPY --from=builder /ton/build/utils/generate-random-id /usr/local/bin/
|
||||
|
||||
WORKDIR /var/ton-work/db
|
||||
COPY init.sh control.template ./
|
||||
COPY ./docker/init.sh ./docker/control.template ./
|
||||
RUN chmod +x init.sh
|
||||
|
||||
ENTRYPOINT ["/var/ton-work/db/init.sh"]
|
||||
ENTRYPOINT ["/var/ton-work/db/init.sh"]
|
Loading…
Reference in a new issue