-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: provide specific version of rust toolchain in Docker image (#144)
- Loading branch information
1 parent
8f43d53
commit 1773b2c
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
.github/workflows/build_orica_server_builder_image_versioned.yaml
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Build builder for orica_server with tagged version | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-rust-test-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@v3 | ||
- name: Login to ACR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
# Build and Push Image with Cache | ||
- name: Build & Push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: docker/orica_server_builder | ||
push: true | ||
build-args: | | ||
RUST_VERSION=1.80 | ||
tags: | | ||
ghcr.io/foresightminingsoftwarecorporation/orica-server-builder-versioned:rust-1.80 |
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
FROM ubuntu:focal | ||
|
||
WORKDIR /usr/src/ | ||
ARG RUST_VERSION=1.8.0 | ||
ARG OPENSSL_VERSION=1.1.1m | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install \ | ||
-yq --no-install-recommends \ | ||
build-essential \ | ||
cmake \ | ||
curl \ | ||
gfortran \ | ||
git \ | ||
gnupg2 \ | ||
gobject-introspection \ | ||
libasound2-dev \ | ||
libatk1.0-0 \ | ||
libcairo-gobject2 \ | ||
libexpat1-dev \ | ||
libfontconfig-dev \ | ||
libfreetype-dev \ | ||
libgdk-pixbuf2.0-0 \ | ||
libglib2.0-0 \ | ||
libgtk-3-dev \ | ||
libmkl-full-dev \ | ||
libomp-8-dev \ | ||
libpango-1.0-0 \ | ||
libssl-dev \ | ||
libudev-dev \ | ||
libxcb-composite0-dev \ | ||
lsb-release \ | ||
musl-dev \ | ||
musl-tools \ | ||
openssh-client \ | ||
pkg-config \ | ||
software-properties-common \ | ||
tzdata \ | ||
wget | ||
|
||
# Static linking for C++ code | ||
RUN ln -s "/usr/bin/g++" "/usr/bin/musl-g++" | ||
|
||
# install Rust | ||
RUN curl https://sh.rustup.rs -sSf | \ | ||
sh -s -- --default-toolchain $RUST_VERSION -y -t x86_64-unknown-linux-musl --profile minimal | ||
|
||
ENV PATH=/root/.cargo/bin:$PATH | ||
RUN rustup target add x86_64-unknown-linux-musl | ||
|
||
# Install OpenSSl | ||
COPY build_openssl_ubuntu.sh build_openssl_ubuntu.sh | ||
RUN ./build_openssl_ubuntu.sh |