File tree Expand file tree Collapse file tree 5 files changed +1
-167
lines changed
Expand file tree Collapse file tree 5 files changed +1
-167
lines changed Original file line number Diff line number Diff line change 66 - main
77 paths :
88 - ' Dockerfile'
9- - ' Dockerfile.ide'
109 tags :
1110 - ' v*'
1211 pull_request :
1312 branches :
1413 - main
1514 paths :
1615 - ' Dockerfile'
17- - ' Dockerfile.ide'
1816 workflow_dispatch :
1917
2018env :
2119 REGISTRY : ghcr.io
2220 BASE_IMAGE_NAME : ${{ github.repository }}
23- IDE_IMAGE_NAME : ${{ github.repository_owner }}/my-ide
2421
2522jobs :
2623 build-and-push :
5855 type=sha,prefix={{branch}}-
5956 type=raw,value=latest,enable={{is_default_branch}}
6057
61- - name : Extract metadata for IDE image
62- id : meta-ide
63- uses : docker/metadata-action@v5
64- with :
65- images : ${{ env.REGISTRY }}/${{ env.IDE_IMAGE_NAME }}
66- tags : |
67- type=ref,event=branch
68- type=ref,event=pr
69- type=semver,pattern={{version}}
70- type=semver,pattern={{major}}.{{minor}}
71- type=semver,pattern={{major}}
72- type=sha,prefix={{branch}}-
73- type=raw,value=latest,enable={{is_default_branch}}
74-
7558 - name : Build and push base image
7659 uses : docker/build-push-action@v6
7760 with :
8366 cache-from : type=gha
8467 cache-to : type=gha,mode=max
8568 platforms : linux/amd64
86-
87- - name : Build and push IDE image
88- uses : docker/build-push-action@v6
89- with :
90- context : .
91- file : ./Dockerfile.ide
92- push : ${{ github.event_name != 'pull_request' }}
93- tags : ${{ steps.meta-ide.outputs.tags }}
94- labels : ${{ steps.meta-ide.outputs.labels }}
95- cache-from : type=gha
96- cache-to : type=gha,mode=max
97- platforms : linux/amd64
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ ENV JAVA_HOME=$SDKMAN_DIR/candidates/java/current
100100ENV PATH=$JAVA_HOME/bin:$PATH
101101
102102# 安装 Maven
103- RUN wget https://dlcdn .apache.org/maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz \
103+ RUN wget https://archive .apache.org/dist /maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz \
104104 && tar -xzf apache-maven-3.9.11-bin.tar.gz -C /opt \
105105 && ln -s /opt/apache-maven-3.9.11 /opt/maven \
106106 && rm apache-maven-3.9.11-bin.tar.gz
@@ -172,7 +172,6 @@ RUN echo "=== Installing ngrok ===" \
172172 && echo "ngrok installed successfully" \
173173 && ngrok version
174174
175- # Note: AI coding tools, VSCode Server, and JetBrains IDEs is in Dockerfile.ide
176175# This base image contains only the development environment
177176
178177# 配置 SSH 服务
@@ -188,7 +187,6 @@ RUN echo '#!/bin/bash' > /start.sh \
188187 && echo '/usr/sbin/sshd' >> /start.sh \
189188 && echo 'echo "SSH service started on port 22"' >> /start.sh \
190189 && echo 'echo "Base development environment is ready."' >> /start.sh \
191- && echo 'echo "For IDE support, use Dockerfile.ide image."' >> /start.sh \
192190 && echo 'echo "SSH access: root@localhost -p 22"' >> /start.sh \
193191 && echo 'exec /bin/bash' >> /start.sh \
194192 && chmod +x /start.sh
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 4444Copy ` Dockerfile ` to the target repo folder
4545
4646Create New Dev Container from Dockerfile under the repo folder
47-
48- ## TODO
49-
50- -[ ] 添加.env外部运行时密钥
51-
52- -[ ] 暴露ssh codespace到外部端口
53-
54- -[ ] 基于my-env尝试编写dockerfile.minecraft
You can’t perform that action at this time.
0 commit comments