-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '3464311c48724b7320db09a08685f4f6f97bb8c3' into develop
- Loading branch information
Showing
2 changed files
with
78 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Docker Image CI Ubuntu | ||
|
||
on: | ||
push: | ||
branches: [ "develop" ] | ||
pull_request: | ||
branches: [ "develop" ] | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
platforms: linux/amd64, linux/arm64 | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/emsoft:buildx-latest |
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,43 @@ | ||
FROM marcdegraef/emsoft_sdk:buildx-latest | ||
|
||
ARG TARGETARCH | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# clone EMsoft and set up SDK Debug/Release | ||
RUN cd ~/EMs \ | ||
&& git clone https://github.com/EMsoft-org/EMsoftData.git \ | ||
&& git clone https://github.com/EMsoft-org/EMsoft.git \ | ||
&& mkdir EMsoftBuild | ||
|
||
RUN cd ~/EMs/EMsoftBuild/ && mkdir Debug Release && cd Debug \ | ||
&& cmake -DCMAKE_BUILD_TYPE=Debug -DEMsoft_SDK=/opt/EMsoft_SDK -DBUILD_SHARED_LIBS=OFF \ | ||
../../EMsoft -G Ninja \ | ||
&& ninja \ | ||
&& cd ../Release \ | ||
&& cmake -DCMAKE_BUILD_TYPE=Release -DEMsoft_SDK=/opt/EMsoft_SDK -DBUILD_SHARED_LIBS=OFF \ | ||
../../EMsoft -G Ninja \ | ||
&& ninja | ||
|
||
# add release version to path | ||
ENV PATH ~/EMs/EMsoftBuild/Release/Bin:$PATH | ||
# add backup path of EMsoft | ||
ENV EMSOFTPATHNAME ~/EMs/EMsoft | ||
|
||
# install a new user | ||
ARG user=EMuser | ||
ARG uid=501 | ||
ARG gid=3000 | ||
|
||
# Add new user with our credentials | ||
ENV USERNAME ${user} | ||
RUN useradd -m $USERNAME && \ | ||
echo "$USERNAME:$USERNAME" | chpasswd && \ | ||
usermod --shell /bin/bash $USERNAME && \ | ||
usermod --uid ${uid} $USERNAME && \ | ||
groupmod --gid ${gid} $USERNAME | ||
|
||
USER ${user} | ||
|
||
# run terminal for EMuser at /home/${user} | ||
WORKDIR /home/${user} | ||
CMD ["/bin/bash"] |