mirror of
https://github.com/bytedream/docker4ssh.git
synced 2025-05-09 04:05:10 +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
|
||||
|
||||
COPY ["../", "."]
|
||||
RUN apk add git go make openssh rustup sqlite
|
||||
|
||||
RUN apt update && \
|
||||
apt install make sqlite3 && \
|
||||
apt clean && \
|
||||
apt autoremove && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
RUN rustup-init -y && \
|
||||
ln -s $HOME/.cargo/bin/cargo /usr/bin/cargo
|
||||
|
||||
RUN make BUILDDIR=build/ build-server
|
||||
|
||||
|
||||
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 git clone https://github.com/ByteDream/docker4ssh .
|
||||
|
||||
RUN mkdir build/ && \
|
||||
make BUILDDIR=build/ build && \
|
||||
rm -rf build/release/ build/x86_64-unknown-linux-musl/
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
WORKDIR /docker4ssh
|
||||
|
||||
COPY --from=server /docker4ssh/build/* .
|
||||
COPY --from=client /docker4ssh/build/docker4ssh .
|
||||
COPY --from=extra /docker4ssh/build/* .
|
||||
COPY --from=build /docker4ssh/build/ ./
|
||||
|
||||
ENTRYPOINT docker4ssh
|
||||
ENTRYPOINT ./docker4ssh start
|
||||
|
@ -2,10 +2,12 @@ version: '3'
|
||||
|
||||
services:
|
||||
docker4ssh:
|
||||
build: .
|
||||
build: https://raw.githubusercontent.com/ByteDream/docker4ssh/main/examples/Dockerfile
|
||||
ports:
|
||||
- "8642:8642"
|
||||
- "2222:2222"
|
||||
volumes:
|
||||
- "./docker4ssh.log.log:/docker4ssh/docker4ssh.log"
|
||||
- type: bind
|
||||
source: /var/run/docker.sock
|
||||
target: /var/run/docker.sock
|
||||
restart: unless-stopped
|
||||
container_name: docker4ssh
|
||||
|
Loading…
x
Reference in New Issue
Block a user