这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ COPY ./build/package/ /tmp

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3005,DL3008
RUN echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | debconf-set-selections \
RUN mkdir -p /etc/apt/keyrings \
&& mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
&& apt-get update \
&& apt-get -y --no-install-recommends install docker-ce docker-ce-cli containerd.io docker-compose-plugin \
&& echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | debconf-set-selections \
&& echo "dokku dokku/skip_key_file boolean $DOKKU_SKIP_KEY_FILE" | debconf-set-selections \
&& echo "dokku dokku/vhost_enable boolean $DOKKU_VHOST_ENABLE" | debconf-set-selections \
&& curl -sSL https://packagecloud.io/dokku/dokku/gpgkey | apt-key add - \
Expand Down
4 changes: 2 additions & 2 deletions contrib/build-dokku.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc

ARG GOLANG_VERSION

RUN wget -qO /tmp/go${GOLANG_VERSION}.linux-amd64.tar.gz https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf /tmp/go${GOLANG_VERSION}.linux-amd64.tar.gz \
RUN wget -qO /tmp/go${GOLANG_VERSION}.linux.tar.gz "https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-$(dpkg --print-architecture).tar.gz" \
&& tar -C /usr/local -xzf /tmp/go${GOLANG_VERSION}.linux.tar.gz \
&& cp /usr/local/go/bin/* /usr/local/bin

ARG WORKDIR=/go/src/github.com/dokku/dokku
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Version: 0.28.4
Section: web
Priority: optional
Architecture: amd64
Depends: apache2-utils, locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-image-labeler (>= 0.2.2), lambda-builder, net-tools, netrc, software-properties-common, parallel, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsync, rsyslog, dos2unix, jq, unzip
Depends: apache2-utils, locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-compose-plugin | moby-compose, docker-image-labeler (>= 0.2.2), lambda-builder, net-tools, netrc, software-properties-common, parallel, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsync, rsyslog, dos2unix, jq, unzip
Recommends: herokuish (>= 0.3.4), bash-completion, dokku-update, dokku-event-listener
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python3, debconf
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
Expand Down
2 changes: 1 addition & 1 deletion docs/networking/proxies/caddy.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ caddy:stop # Stops the caddy server

## Requirements

Using the `caddy` plugin integration requires the `docker-compose-plugin` for Docker. See [this document](https://docs.docker.com/compose/install/compose-plugin/) from the Docker documentation for more information on the installation process for the `docker-compose-plugin`.
Using the `caddy` plugin integration requires the `docker-compose-plugin` for Docker. See [this document](https://docs.docker.com/compose/install/) from the Docker documentation for more information on the installation process for the `docker-compose-plugin`.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/networking/proxies/traefik.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ traefik:stop # Stops the traefik server

## Requirements

Using the `traefik` plugin integration requires the `docker-compose-plugin` for Docker. See [this document](https://docs.docker.com/compose/install/compose-plugin/) from the Docker documentation for more information on the installation process for the `docker-compose-plugin`.
Using the `traefik` plugin integration requires the `docker-compose-plugin` for Docker. See [this document](https://docs.docker.com/compose/install/) from the Docker documentation for more information on the installation process for the `docker-compose-plugin`.

## Usage

Expand Down
12 changes: 12 additions & 0 deletions plugins/caddy-vhosts/command-functions
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ cmd-caddy-show-config() {
declare cmd="caddy:show-config"
[[ "$1" == "$cmd" ]] && shift 1

if ! fn-is-compose-installed; then
dokku_log_fail "Required docker compose plugin is not installed"
fi

local TMP_COMPOSE_FILE=$(mktemp "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
trap "rm -rf '$TMP_COMPOSE_FILE' >/dev/null" RETURN INT TERM EXIT

Expand All @@ -120,6 +124,10 @@ cmd-caddy-start() {
declare cmd="caddy:start"
[[ "$1" == "$cmd" ]] && shift 1

if ! fn-is-compose-installed; then
dokku_log_fail "Required docker compose plugin is not installed"
fi

local TMP_COMPOSE_FILE=$(mktemp "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
trap "rm -rf '$TMP_COMPOSE_FILE' >/dev/null" RETURN INT TERM EXIT

Expand All @@ -132,6 +140,10 @@ cmd-caddy-stop() {
declare cmd="caddy:start"
[[ "$1" == "$cmd" ]] && shift 1

if ! fn-is-compose-installed; then
dokku_log_fail "Required docker compose plugin is not installed"
fi

local TMP_COMPOSE_FILE=$(mktemp "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
trap "rm -rf '$TMP_COMPOSE_FILE' >/dev/null" RETURN INT TERM EXIT

Expand Down
12 changes: 12 additions & 0 deletions plugins/common/functions
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,18 @@ get_docker_version() {
echo "$CLIENT_VERSION_STRING"
}

fn-is-compose-installed() {
declare desc="check if the compose docker plugin is installed"
local COMPOSE_INSTALLED
COMPOSE_INSTALLED="$(docker info -f '{{range .ClientInfo.Plugins}}{{if eq .Name "compose"}}true{{end}}{{end}}')"

if [[ "$COMPOSE_INSTALLED" == "true" ]]; then
return 0
fi

return 1
}

is_number() {
declare desc="returns 0 if input is a number"
local NUMBER=$1
Expand Down
12 changes: 12 additions & 0 deletions plugins/traefik-vhosts/command-functions
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ cmd-traefik-show-config() {
declare cmd="traefik:show-config"
[[ "$1" == "$cmd" ]] && shift 1

if ! fn-is-compose-installed; then
dokku_log_fail "Required docker compose plugin is not installed"
fi

local TMP_COMPOSE_FILE=$(mktemp "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
trap "rm -rf '$TMP_COMPOSE_FILE' >/dev/null" RETURN INT TERM EXIT

Expand All @@ -123,6 +127,10 @@ cmd-traefik-start() {
declare cmd="traefik:start"
[[ "$1" == "$cmd" ]] && shift 1

if ! fn-is-compose-installed; then
dokku_log_fail "Required docker compose plugin is not installed"
fi

local TMP_COMPOSE_FILE=$(mktemp "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
trap "rm -rf '$TMP_COMPOSE_FILE' >/dev/null" RETURN INT TERM EXIT

Expand All @@ -137,6 +145,10 @@ cmd-traefik-stop() {
declare cmd="traefik:start"
[[ "$1" == "$cmd" ]] && shift 1

if ! fn-is-compose-installed; then
dokku_log_fail "Required docker compose plugin is not installed"
fi

local TMP_COMPOSE_FILE=$(mktemp "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
trap "rm -rf '$TMP_COMPOSE_FILE' >/dev/null" RETURN INT TERM EXIT

Expand Down