forked from ochinchina/supervisord
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* debug ci * update docker img tag
- Loading branch information
Showing
4 changed files
with
88 additions
and
37 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
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 |
---|---|---|
@@ -1,10 +1,24 @@ | ||
FROM golang:alpine AS base | ||
RUN apk add --no-cache --update git gcc rust | ||
# Distributed under the terms of the Modified BSD License. | ||
|
||
ARG BASE_NAMESPACE | ||
ARG BUILD_IMG="golang:latest" | ||
ARG BASE_IMG="ubuntu:latest" | ||
|
||
FROM base AS builder | ||
COPY . /tmp/src | ||
WORKDIR /tmp/src | ||
FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BUILD_IMG} AS builder | ||
|
||
RUN if command -v apt-get >/dev/null 2>&1; then \ | ||
echo "Detected Debian/Ubuntu environment. Installing packages using apt-get..." ; \ | ||
apt-get update && apt-get install -y gcc ; \ | ||
elif command -v apk >/dev/null 2>&1; then \ | ||
echo "Detected Alpine environment. Installing packages using apk..." ; \ | ||
apk add --no-cache gcc musl-dev ; \ | ||
else \ | ||
echo "Unsupported environment. Neither apt-get nor apk found." ; \ | ||
return 1 ; \ | ||
fi | ||
|
||
COPY ./src /tmp/src | ||
WORKDIR /tmp/src | ||
RUN set -eux && pwd && ls -alh \ | ||
&& mkdir -pv /opt/supervisord && mv webgui etc /opt/supervisord/ \ | ||
&& cd supervisord \ | ||
|
@@ -13,7 +27,9 @@ RUN set -eux && pwd && ls -alh \ | |
&& /opt/supervisord/supervisord version | ||
|
||
|
||
FROM busybox | ||
ARG BASE_IMG="atom" | ||
FROM ${BASE_IMG} | ||
LABEL maintainer="[email protected]" | ||
COPY --from=builder /opt/supervisord /opt/supervisord | ||
EXPOSE 9001 | ||
WORKDIR /opt/supervisord/ | ||
|
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