-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
7afb4c5
commit 2c57ad4
Showing
3 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
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,53 @@ | ||
ARG ROCKY_LINUX_VERSIONS | ||
|
||
FROM rockylinux:${ROCKY_LINUX_VERSIONS} | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN update-ca-trust; \ | ||
rm -f /etc/localtime; \ | ||
ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime; \ | ||
# dnf update -y; \ | ||
dnf install -y \ | ||
autoconf \ | ||
automake \ | ||
bison \ | ||
bzip2 \ | ||
cmake \ | ||
git \ | ||
libtool \ | ||
make \ | ||
openssh.x86_64 \ | ||
openssh-clients \ | ||
patch \ | ||
rpm-build \ | ||
tar \ | ||
wget \ | ||
libuuid-devel.x86_64 \ | ||
clang-tools-extra.x86_64 \ | ||
gcc-toolset-13* \ | ||
which \ | ||
yum-utils; \ | ||
dnf clean all | ||
|
||
RUN echo "source /opt/rh/gcc-toolset-13/enable" >> ~/.bashrc | ||
RUN source /opt/rh/gcc-toolset-13/enable && g++ -v | ||
|
||
WORKDIR /root | ||
|
||
RUN source /opt/rh/gcc-toolset-13/enable \ | ||
&&curl -kfsSL https://xmake.io/shget.text | bash -s v2.9.1 \ | ||
&& echo "export XMAKE_ROOT=y" >> ~/.bashrc \ | ||
&& echo "source ~/.xmake/profile" >> ~/.bashrc | ||
|
||
RUN source /opt/rh/gcc-toolset-13/enable \ | ||
&& export XMAKE_ROOT=y \ | ||
&& source ~/.xmake/profile \ | ||
&& xmake --version \ | ||
&& git clone https://github.com/fantasy-peak/frpc.git \ | ||
&& cd frpc \ | ||
&& xmake build -v -y --file=./xmake.lua \ | ||
&& xmake install -o . --file=./xmake.lua \ | ||
&& ./bin/frpc -f ./config/config.yaml -t ./template/cpp -o ./out -w ./template/web --auto_sort=0 --debug=0 \ | ||
&& xmake build -v -y --file=./test_xmake.lua \ | ||
&& xmake install -o . --file=./test_xmake.lua |
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,24 @@ | ||
ROCKY_LINUX_VERSIONS := 8.9.20231119 | ||
REPOSITORY_NAME := rockylinux-frpc | ||
CONTAINER := "rockylinux-frpc" | ||
|
||
.PONY: $(ROCKY_LINUX_VERSIONS) | ||
default: $(ROCKY_LINUX_VERSIONS) | ||
|
||
|
||
$(ROCKY_LINUX_VERSIONS): | ||
@echo "----(${REPOSITORY_NAME}:${ROCKY_LINUX_VERSIONS})" | ||
# docker build --progress=plain --no-cache --build-arg ROCKY_LINUX_VERSIONS=$@ -t ${REPOSITORY_NAME}:$@ . | ||
docker build --progress=plain --build-arg ROCKY_LINUX_VERSIONS=$@ -t ${REPOSITORY_NAME}:$@ . | ||
|
||
del: | ||
docker rm -f ${CONTAINER} | ||
docker rmi -f ${REPOSITORY_NAME}:${ROCKY_LINUX_VERSIONS} | ||
|
||
run: | ||
docker run -it -v /var/run/docker.sock:/var/run/docker.sock --net=host --privileged --name ${CONTAINER} ${REPOSITORY_NAME}:${ROCKY_LINUX_VERSIONS} | ||
|
||
login: | ||
docker start $(CONTAINER) | ||
docker exec -i -t $(CONTAINER) /bin/bash | ||
|