2017-11-26 22:44:32 +01:00
|
|
|
|
---
|
|
|
|
|
date: "2016-12-01T16:00:00+02:00"
|
|
|
|
|
title: "Docker 安裝"
|
|
|
|
|
slug: "install-with-docker"
|
2023-04-04 15:47:31 +02:00
|
|
|
|
weight: 70
|
2020-12-09 07:47:06 +01:00
|
|
|
|
toc: false
|
2017-11-26 22:44:32 +01:00
|
|
|
|
draft: false
|
Refactor docs (#23752)
This was intended to be a small followup for
https://github.com/go-gitea/gitea/pull/23712, but...here we are.
1. Our docs currently use `slug` as the entire URL, which makes
refactoring tricky (see https://github.com/go-gitea/gitea/pull/23712).
Instead, this PR attempts to make future refactoring easier by using
slugs as an extension of the section. (Hugo terminology)
- What the above boils down to is this PR attempts to use directory
organization as URL management. e.g. `usage/comparison.en-us.md` ->
`en-us/usage/comparison/`, `usage/packages/overview.en-us.md` ->
`en-us/usage/packages/overview/`
- Technically we could even remove `slug`, as Hugo defaults to using
filename, however at least with this PR it means `slug` only needs to be
the name for the **current file** rather than an entire URL
2. This PR adds appropriate aliases (redirects) for pages, so anything
on the internet that links to our docs should hopefully not break.
3. A minor nit I've had for a while, renaming `seek-help` to `support`.
It's a minor thing, but `seek-help` has a strange connotation to it.
4. The commits are split such that you can review the first which is the
"actual" change, and the second is added redirects so that the first
doesn't break links elsewhere.
---------
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-04-28 05:33:41 +02:00
|
|
|
|
aliases:
|
|
|
|
|
- /zh-tw/install-with-docker
|
2017-11-26 22:44:32 +01:00
|
|
|
|
menu:
|
|
|
|
|
sidebar:
|
|
|
|
|
parent: "installation"
|
|
|
|
|
name: "Docker 安裝"
|
2023-04-04 15:47:31 +02:00
|
|
|
|
weight: 70
|
2017-11-26 22:44:32 +01:00
|
|
|
|
identifier: "install-with-docker"
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# 用 Docker 安裝
|
|
|
|
|
|
2020-12-08 05:52:26 +01:00
|
|
|
|
{{< toc >}}
|
|
|
|
|
|
2017-11-26 22:44:32 +01:00
|
|
|
|
我們在 Docker Hub 提供了自動更新的映像檔,它會保持最新穩定版。根據您的部屬環境來使用最新版本或用其他服務來更新 Docker 映像檔。首先您需要下載映像檔:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
docker pull gitea/gitea:latest
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
為了儲存您的所有 Git 儲存庫資料,您應該建立一個目錄,用來存放資料的地方。
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
sudo mkdir -p /var/lib/gitea
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
現在就可以直接啟動 Docker 容器,這是一個非常簡單的過程,您必須定義啟動連接埠,並且提供上面所建立的資料儲存路徑:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
docker run -d --name=gitea -p 10022:22 -p 10080:3000 -v /var/lib/gitea:/data gitea/gitea:latest
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
然後 Gitea 容器已經開始運行,您可以透過個人喜愛的瀏覽器來訪問 http://hostname:10080,假如您想要開始 Clone 儲存庫,可以直接執行 `git clone ssh://git@hostname:10022/username/repo.git` 指令。
|
|
|
|
|
|
|
|
|
|
## 需要協助?
|
|
|
|
|
|
2020-02-25 18:36:45 +01:00
|
|
|
|
如果本頁中無法解決您的問題,請直接到 [Discord server](https://discord.gg/Gitea),在那邊可以快速得到協助。
|