Skip to content

Commit 05286b3

Browse files
committed
chore: build images for dev
1 parent 3b5e0e1 commit 05286b3

File tree

3 files changed

+126
-1
lines changed

3 files changed

+126
-1
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: build dev image and push image to ghcr.io for devcontainer
2+
3+
on:
4+
workflow_dispatch:
5+
# push:
6+
# branches:
7+
# - 'main'
8+
9+
jobs:
10+
docker_ubuntu_2204:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@v3
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Login to DockerHub
23+
uses: docker/login-action@v3
24+
with:
25+
username: ${{ secrets.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_TOKEN }}
27+
28+
- name: Login to GitHub Container Registry
29+
uses: docker/login-action@v3
30+
with:
31+
registry: ghcr.io
32+
username: ${{ github.repository_owner }}
33+
password: ${{ secrets.GHCR_TOKEN }}
34+
35+
- name: Build and push latest
36+
uses: docker/[email protected]
37+
with:
38+
file: ubuntu/rssbot.dev.Dockerfile
39+
context: .
40+
platforms: linux/amd64
41+
push: true
42+
tags: |
43+
${{ github.repository_owner }}/rss_generic_i18n_bot:latest
44+
ghcr.io/${{ github.repository_owner }}/rss_generic_i18n_bot:latest
45+
cache-from: type=gha
46+
cache-to: type=gha,mode=max

ubuntu/22.04.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ RUN wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/p
5757
RUN cd /tmp \
5858
&& git clone https://github.com/ryanoasis/nerd-fonts.git --depth 1 \
5959
&& cd nerd-fonts \
60-
&& ./install.sh
60+
&& ./install.sh Meslo
6161

6262
RUN echo "deb [trusted=yes] https://apt.fury.io/versionfox/ /" | sudo tee /etc/apt/sources.list.d/versionfox.list \
6363
&& apt-get update \

ubuntu/rssbot.dev.Dockerfile

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
FROM ubuntu:22.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
ENV TZ=Asia/Shanghai
5+
6+
RUN apt-get update -y && apt-get upgrade -y
7+
RUN apt-get install -y \
8+
software-properties-common \
9+
build-essential \
10+
apt-transport-https \
11+
unzip \
12+
sudo \
13+
locales \
14+
iputils-ping \
15+
git \
16+
curl \
17+
wget \
18+
sysstat \
19+
libssl-dev \
20+
make \
21+
automake \
22+
autoconf \
23+
libncurses5-dev \
24+
gcc \
25+
xsltproc \
26+
fop \
27+
libxml2-utils \
28+
libwxgtk3.0-gtk3-dev \
29+
unixodbc \
30+
unixodbc-dev \
31+
m4 \
32+
default-jdk \
33+
tzdata \
34+
net-tools
35+
36+
RUN locale-gen en_US en_US.UTF-8
37+
ENV LC_ALL=en_US.UTF-8
38+
ENV LANG=en_US.UTF-8
39+
ENV LANGUAGE=en_US.UTF-8
40+
41+
# C++ 17 support for enable JIT
42+
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y \
43+
&& apt-get update -y \
44+
&& apt-get install gcc-9 g++-9 -y \
45+
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
46+
47+
# beautify terminal
48+
RUN wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh \
49+
&& chmod +x /usr/local/bin/oh-my-posh \
50+
&& mkdir /root/.poshthemes \
51+
&& wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/themes.zip -O /root/.poshthemes/themes.zip \
52+
&& unzip /root/.poshthemes/themes.zip -d /root/.poshthemes \
53+
&& chmod u+rw /root/.poshthemes/*.omp.* \
54+
&& rm /root/.poshthemes/themes.zip \
55+
&& echo 'eval "$(oh-my-posh --init --shell bash --config ~/.poshthemes/emodipt-extend.omp.json)"' >> /root/.bashrc
56+
# Remember install fonts
57+
RUN cd /tmp \
58+
&& git clone https://github.com/ryanoasis/nerd-fonts.git --depth 1 \
59+
&& cd nerd-fonts \
60+
&& ./install.sh Meslo
61+
62+
RUN echo "deb [trusted=yes] https://apt.fury.io/versionfox/ /" | sudo tee /etc/apt/sources.list.d/versionfox.list \
63+
&& apt-get update \
64+
&& apt-get install -y vfox
65+
66+
SHELL ["/bin/bash", "-c"]
67+
ENV ERLANG_VERSION=26.2.5
68+
ENV ELIXIR_VERSION=1.16.2
69+
ENV MAKEFLAGS=-j8
70+
RUN vfox add erlang \
71+
&& vfox add elixir \
72+
&& vfox install erlang@${ERLANG_VERSION}
73+
RUN vfox use erlang@${ERLANG_VERSION} \
74+
&& eval "$(vfox activate bash)" \
75+
&& vfox install elixir@${ELIXIR_VERSION}
76+
77+
RUN vfox add mongo && vfox install mongo@x86_64-ubuntu2004-5.0.26
78+
79+
RUN echo 'root:EnjoyLife' | chpasswd

0 commit comments

Comments
 (0)