-
Notifications
You must be signed in to change notification settings - Fork 0
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
bumu
committed
Dec 15, 2023
1 parent
ca140c9
commit 4080ba7
Showing
38 changed files
with
348 additions
and
255 deletions.
There are no files selected for viewing
File renamed without changes.
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,41 @@ | ||
# LABEL Maintainer="airdb team <[email protected]>" Description="https://github.com/airdb" | ||
|
||
SERVICE := apkbuild | ||
|
||
all: help | ||
|
||
help: ## Show help messages | ||
@echo "Container - ${SERVICE} " | ||
@echo | ||
@echo "Usage:\tmake COMMAND" | ||
@echo | ||
@echo "Commands:" | ||
@sed -n '/##/s/\(.*\):.*##/ \1#/p' ${MAKEFILE_LIST} | grep -v "MAKEFILE_LIST" | column -t -c 2 -s '#' | ||
|
||
up: ## Create and start containers | ||
docker compose up -d --force-recreate | ||
#docker compose up -d --build --force-recreate | ||
|
||
build: ## Build or rebuild services | ||
docker compose build --no-cache | ||
|
||
start: ## Start services | ||
docker compose start ${SERVICE} | ||
|
||
stop: ## Stop services | ||
docker compose stop ${SERVICE} | ||
|
||
restart: ## Restart containers | ||
docker compose restart ${SERVICE} | ||
|
||
ps: ## List containers | ||
docker compose ps | ||
|
||
log logs: ## View output from containers | ||
docker compose logs ${SERVICE} | ||
|
||
rm: stop ## Stop and remove stopped service containers | ||
docker compose rm ${SERVICE} | ||
|
||
bash: ## Execute a command in a running container | ||
docker compose exec ${SERVICE} bash |
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,8 @@ | ||
# Alpine | ||
|
||
最小的 linux, 可以用来构建最小的 docker image. | ||
|
||
|
||
Make customized Alpine Linux rootfs (base image) for containers | ||
|
||
- https://github.com/alpinelinux/alpine-make-rootfs |
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,18 @@ | ||
version: '3' | ||
|
||
services: | ||
apkbuild: | ||
container_name: apkbuild | ||
image: 'airdb/apkbuild:latest' | ||
platform: linux/amd64 | ||
working_dir: /srv/ | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
command: sleep 3600 | ||
volumes: | ||
- ./:/srv/apkbuild | ||
ports: | ||
- "8080:8080" | ||
environment: | ||
- env=test |
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
File renamed without changes.
File renamed without changes.
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,11 @@ | ||
Base image | ||
|
||
|
||
## 安装包 | ||
gcc g++ make | ||
|
||
net-tools iproute2 iputils-ping telnet nmap | ||
|
||
ca-certificates | ||
|
||
curl git less vim |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,35 @@ | ||
FROM ubuntu | ||
|
||
# Usage: | ||
# docker build -t airdb/fpm . -f fpm.dockerfile | ||
# docker run --rm -v $(pwd):/srv airdb/fpm | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
MAINTAINER https://github.com/airdb | ||
|
||
RUN echo "export VISIBLE=now" >> /etc/profile | ||
|
||
ENV RUNNING_CONTEXT "docker" | ||
ENV echo "export RUNNING_CONTEXT=docker" >> /etc/profile | ||
|
||
RUN echo "export PS1='[\H \W]\\$ '" >> /root/.profile | ||
|
||
WORKDIR /srv | ||
|
||
RUN apt update && apt-get install -y sudo vim libgcrypt-dev libgd-dev ruby ruby-dev rubygems-integration build-essential | ||
|
||
#RUN gem install --no-ri --no-rdoc fpm | ||
RUN gem install fpm | ||
|
||
CMD fpm -s dir \ | ||
-t deb \ | ||
-a amd64 \ | ||
-n airdb \ | ||
-v 1.0.0 \ | ||
-m 'Dean CN <[email protected]>' \ | ||
--url 'https://www.airdb.com' \ | ||
--description 'Hello airdb' \ | ||
--before-install ./output/before-install.sh \ | ||
--after-install ./output/after-install.sh \ | ||
-C ./output/ |
Oops, something went wrong.