-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
workflow_dispatch: | ||
|
||
push: | ||
branches: [main] | ||
branches: [main, update-docker] | ||
tags: ["v*.*.*"] | ||
|
||
env: | ||
|
@@ -52,6 +52,23 @@ jobs: | |
with: | ||
images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.image_name }} | ||
|
||
- name: Install toolchain | ||
id: toolchain | ||
uses: actions-rs/toolchain@master | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
target: wasm32-unknown-unknown | ||
|
||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
|
||
- name: Install Protobuf | ||
run: sudo apt-get install protobuf-compiler | ||
|
||
- name: Build binary | ||
run: cargo build --release tangle | ||
|
||
# Build and push Docker image with Buildx (don't push on PR) | ||
# https://github.com/docker/build-push-action | ||
- name: Build and push Docker image | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,22 +12,9 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
FROM docker.io/paritytech/ci-linux:production | ||
FROM ubuntu:22.04 | ||
|
||
ENV TZ=GMT | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
WORKDIR /tangle | ||
|
||
COPY . . | ||
|
||
# Install Required Packages | ||
RUN apt-get update && apt-get install -y git && apt-get -y install sudo \ | ||
cmake clang curl libssl-dev llvm libudev-dev \ | ||
libgmp3-dev protobuf-compiler ca-certificates \ | ||
&& rm -rf /var/lib/apt/lists/* && update-ca-certificates | ||
|
||
RUN cargo build --locked --release --features txpool | ||
COPY ./target/release/tangle /usr/local/bin/ | ||
|
||
LABEL maintainer="Webb Developers <[email protected]>" | ||
LABEL description="Tangle Network Node" | ||
|
@@ -36,7 +23,6 @@ RUN useradd -m -u 5000 -U -s /bin/sh -d /tangle tangle && \ | |
mkdir -p /data /tangle/.local/share && \ | ||
chown -R tangle:tangle /data && \ | ||
ln -s /data /tangle/.local/share/tangle && \ | ||
cp /tangle/target/release/tangle /usr/local/bin && \ | ||
# unclutter and minimize the attack surface | ||
rm -rf /usr/bin /usr/sbin && \ | ||
# check if executable works in this container | ||
|