-
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.
- Loading branch information
0 parents
commit 2cbebec
Showing
3 changed files
with
121 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,47 @@ | ||
name: build image and push image to dockerhub & ghcr.io | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
docker_ubuntu_2204: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GHCR_TOKEN }} | ||
- | ||
name: Build and push latest | ||
uses: docker/[email protected] | ||
with: | ||
file: ubuntu/22.04.Dockerfile | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: | | ||
${{ github.repository_owner }}/erlang_elixir_vfox_ubuntu_container:latest | ||
ghcr.io/${{ github.repository_owner }}/erlang_elixir_vfox_ubuntu_container:latest | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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,3 @@ | ||
# erlang_elixir_vfox_ubuntu_container | ||
|
||
erlang & elixir & vfox base 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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Asia/Shanghai | ||
|
||
RUN apt-get update -y && apt-get upgrade -y | ||
RUN apt-get install -y \ | ||
software-properties-common \ | ||
build-essential \ | ||
apt-transport-https \ | ||
unzip \ | ||
sudo \ | ||
locales \ | ||
iputils-ping \ | ||
git \ | ||
curl \ | ||
wget \ | ||
sysstat \ | ||
libssl-dev \ | ||
make \ | ||
automake \ | ||
autoconf \ | ||
libncurses5-dev \ | ||
gcc \ | ||
xsltproc \ | ||
fop \ | ||
libxml2-utils \ | ||
libwxgtk3.0-gtk3-dev \ | ||
unixodbc \ | ||
unixodbc-dev \ | ||
m4 \ | ||
default-jdk \ | ||
tzdata \ | ||
net-tools | ||
|
||
RUN locale-gen en_US en_US.UTF-8 | ||
ENV LC_ALL=en_US.UTF-8 | ||
ENV LANG=en_US.UTF-8 | ||
ENV LANGUAGE=en_US.UTF-8 | ||
|
||
# C++ 17 support for enable JIT | ||
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y \ | ||
&& apt-get update -y \ | ||
&& apt-get install gcc-9 g++-9 -y \ | ||
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 | ||
|
||
# beautify terminal | ||
RUN wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh \ | ||
&& chmod +x /usr/local/bin/oh-my-posh \ | ||
&& mkdir /root/.poshthemes \ | ||
&& wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/themes.zip -O /root/.poshthemes/themes.zip \ | ||
&& unzip /root/.poshthemes/themes.zip -d /root/.poshthemes \ | ||
&& chmod u+rw /root/.poshthemes/*.omp.* \ | ||
&& rm /root/.poshthemes/themes.zip \ | ||
&& echo 'eval "$(oh-my-posh --init --shell bash --config ~/.poshthemes/emodipt-extend.omp.json)"' >> /root/.bashrc | ||
# Remember install fonts | ||
# oh-my-posh font install | ||
|
||
RUN echo "deb [trusted=yes] https://apt.fury.io/versionfox/ /" | sudo tee /etc/apt/sources.list.d/versionfox.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y vfox | ||
|
||
ENV ERLANG_VERSION=26.2.5 | ||
ENV ELIXIR_VERSION=1.16.2 | ||
ENV MAKEFLAGS=-j8 | ||
RUN vfox add erlang \ | ||
&& vfox add elixir \ | ||
&& vfox install erlang@${ERLANG_VERSION} \ | ||
&& vfox install elixir@${ELIXIR_VERSION} | ||
|
||
RUN echo 'root:EnjoyLife' | chpasswd |