From 4ef9864bfe5e5f64703148b2337d7bc58ee075b8 Mon Sep 17 00:00:00 2001 From: evlic Date: Mon, 27 Mar 2023 01:56:02 +0800 Subject: [PATCH] =?UTF-8?q?feat(dev):=20=E2=9C=A8=20add=20super=5Fdev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 ++ alpine/Dockerfile | 6 +++--- docker-compose.yaml | 27 +++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/.env b/.env index c9e6056..63ab0da 100644 --- a/.env +++ b/.env @@ -1 +1,3 @@ COMPOSE_PROJECT_NAME=dev + +DIR=. \ No newline at end of file diff --git a/alpine/Dockerfile b/alpine/Dockerfile index e2a2ef7..1e1ebb5 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -1,5 +1,5 @@ FROM alpine:latest -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tencent.com/g' /etc/apk/repositories \ - && apk add gcompat libstdc++ \ - && apk add openssh zsh git \ No newline at end of file +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tencent.com/g' /etc/apk/repositories && apk --no-cache add gcompat libstdc++ openssh zsh git + +WORKDIR /root \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index e69de29..90b771a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -0,0 +1,27 @@ +version: '3.5' +services: + alpine: + container_name: dev + image: alpine:dev + build: + context: ./alpine + hostname: dev + volumes: + - ${DIR}/alpine/root:/root + - ${HOME}/.ssh:/root/host/.ssh + networks: + - dev + command: tail -f /dev/null + restart: always + super_docker: + container_name: super_docker + image: justincormack/nsenter1:latest + restart: always + networks: + - dev + command: tail -f /dev/null + + +networks: + dev: + driver: bridge \ No newline at end of file