mirror of
https://github.com/bytedream/docker4ssh.git
synced 2025-05-09 12:15:11 +02:00
Fixed several docker errors
This commit is contained in:
parent
f4e4b9b6aa
commit
fae0f87436
@ -1,47 +1,22 @@
|
|||||||
FROM golang:1.17 as server
|
FROM alpine:latest as build
|
||||||
|
|
||||||
WORKDIR /docker4ssh
|
WORKDIR /docker4ssh
|
||||||
|
|
||||||
COPY ["../", "."]
|
RUN apk add git go make openssh rustup sqlite
|
||||||
|
|
||||||
RUN apt update && \
|
RUN rustup-init -y && \
|
||||||
apt install make sqlite3 && \
|
ln -s $HOME/.cargo/bin/cargo /usr/bin/cargo
|
||||||
apt clean && \
|
|
||||||
apt autoremove && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN make BUILDDIR=build/ build-server
|
RUN git clone https://github.com/ByteDream/docker4ssh .
|
||||||
|
|
||||||
|
|
||||||
FROM rust:1.56 as client
|
|
||||||
|
|
||||||
WORKDIR /docker4ssh
|
|
||||||
|
|
||||||
COPY ../ .
|
|
||||||
|
|
||||||
RUN apt update && \
|
|
||||||
apt install make \
|
|
||||||
|
|
||||||
RUN make BUILDDIR=build/ build-client
|
|
||||||
|
|
||||||
|
|
||||||
FROM alpine:lastest as extra
|
|
||||||
|
|
||||||
WORKDIR /docker4ssh
|
|
||||||
|
|
||||||
COPY ../ .
|
|
||||||
|
|
||||||
RUN apk add make
|
|
||||||
|
|
||||||
RUN make BUILDDIR=build/ build-extra
|
|
||||||
|
|
||||||
|
RUN mkdir build/ && \
|
||||||
|
make BUILDDIR=build/ build && \
|
||||||
|
rm -rf build/release/ build/x86_64-unknown-linux-musl/
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
WORKDIR /docker4ssh
|
WORKDIR /docker4ssh
|
||||||
|
|
||||||
COPY --from=server /docker4ssh/build/* .
|
COPY --from=build /docker4ssh/build/ ./
|
||||||
COPY --from=client /docker4ssh/build/docker4ssh .
|
|
||||||
COPY --from=extra /docker4ssh/build/* .
|
|
||||||
|
|
||||||
ENTRYPOINT docker4ssh
|
ENTRYPOINT ./docker4ssh start
|
||||||
|
@ -2,10 +2,12 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
docker4ssh:
|
docker4ssh:
|
||||||
build: .
|
build: https://raw.githubusercontent.com/ByteDream/docker4ssh/main/examples/Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "8642:8642"
|
- "2222:2222"
|
||||||
volumes:
|
volumes:
|
||||||
- "./docker4ssh.log.log:/docker4ssh/docker4ssh.log"
|
- type: bind
|
||||||
|
source: /var/run/docker.sock
|
||||||
|
target: /var/run/docker.sock
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
container_name: docker4ssh
|
container_name: docker4ssh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user