mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
Merge pull request #1550 from majestrate/docker-ci-jizz-2021-02-25
speed up ci pipeline
This commit is contained in:
commit
7c02b6ea08
|
@ -2,7 +2,7 @@ local default_deps_base='libsystemd-dev python3-dev libuv1-dev libunbound-dev ne
|
|||
local default_deps_nocxx='libsodium-dev ' + default_deps_base; // libsodium-dev needs to be >= 1.0.18
|
||||
local default_deps='g++ ' + default_deps_nocxx; // g++ sometimes needs replacement
|
||||
local default_windows_deps='mingw-w64 zip nsis';
|
||||
|
||||
local docker_base = 'registry.oxen.rocks/lokinet-ci-';
|
||||
|
||||
local submodules = {
|
||||
name: 'submodules',
|
||||
|
@ -93,7 +93,6 @@ local windows_cross_pipeline(name, image,
|
|||
'eatmydata ' + apt_get_quiet + ' install -y build-essential cmake git ninja-build pkg-config ccache g++-mingw-w64-x86-64-posix nsis zip automake libtool',
|
||||
'update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix',
|
||||
'update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix',
|
||||
'git clone https://github.com/despair86/libuv.git win32-setup/libuv',
|
||||
'mkdir build',
|
||||
'cd build',
|
||||
'cmake .. -G Ninja -DCMAKE_EXE_LINKER_FLAGS=-fstack-protector -DCMAKE_CXX_FLAGS=-fdiagnostics-color=always -DCMAKE_TOOLCHAIN_FILE=../contrib/cross/mingw'+toolchain+'.cmake -DCMAKE_BUILD_TYPE='+build_type+' ' +
|
||||
|
@ -192,7 +191,7 @@ local mac_builder(name, build_type='Release', werror=true, cmake_extra='', extra
|
|||
kind: 'pipeline',
|
||||
type: 'docker',
|
||||
steps: [{
|
||||
name: 'build', image: 'debian:sid',
|
||||
name: 'build', image: 'registry.oxen.rocks/lokinet-ci-lint',
|
||||
commands: [
|
||||
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||
apt_get_quiet + ' update',
|
||||
|
@ -205,10 +204,10 @@ local mac_builder(name, build_type='Release', werror=true, cmake_extra='', extra
|
|||
// Various debian builds
|
||||
debian_pipeline("Debian sid (amd64)", "debian:sid"),
|
||||
debian_pipeline("Debian sid/Debug (amd64)", "debian:sid", build_type='Debug'),
|
||||
debian_pipeline("Debian sid/clang-11 (amd64)", "debian:sid", deps='clang-11 '+default_deps_nocxx,
|
||||
debian_pipeline("Debian sid/clang-11 (amd64)", docker_base+'debian-sid', deps='clang-11 '+default_deps_nocxx,
|
||||
cmake_extra='-DCMAKE_C_COMPILER=clang-11 -DCMAKE_CXX_COMPILER=clang++-11 '),
|
||||
debian_pipeline("Debian buster (i386)", "i386/debian:buster", cmake_extra='-DDOWNLOAD_SODIUM=ON'),
|
||||
debian_pipeline("Ubuntu focal (amd64)", "ubuntu:focal"),
|
||||
debian_pipeline("Ubuntu focal (amd64)", docker_base+'ubuntu-focal'),
|
||||
debian_pipeline("Ubuntu bionic (amd64)", "ubuntu:bionic", deps='g++-8 ' + default_deps_nocxx,
|
||||
cmake_extra='-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8', loki_repo=true),
|
||||
|
||||
|
@ -226,13 +225,13 @@ local mac_builder(name, build_type='Release', werror=true, cmake_extra='', extra
|
|||
]),
|
||||
|
||||
// Windows builds (x64)
|
||||
windows_cross_pipeline("Windows (amd64)", "debian:testing",
|
||||
windows_cross_pipeline("Windows (amd64)", docker_base+'debian-win32-cross',
|
||||
toolchain='64', extra_cmds=[
|
||||
'../contrib/ci/drone-static-upload.sh'
|
||||
]),
|
||||
|
||||
// Static build (on bionic) which gets uploaded to builds.lokinet.dev:
|
||||
debian_pipeline("Static (bionic amd64)", "ubuntu:bionic", deps='g++-8 python3-dev automake libtool', lto=true,
|
||||
debian_pipeline("Static (bionic amd64)", docker_base+'ubuntu-bionic', deps='g++-8 python3-dev automake libtool', lto=true,
|
||||
cmake_extra='-DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 ' +
|
||||
'-DCMAKE_CXX_FLAGS="-march=x86-64 -mtune=haswell" -DCMAKE_C_FLAGS="-march=x86-64 -mtune=haswell" -DNATIVE_BUILD=OFF ' +
|
||||
'-DWITH_SYSTEMD=OFF',
|
||||
|
|
8
contrib/ci/docker/android.dockerfile
Normal file
8
contrib/ci/docker/android.dockerfile
Normal file
|
@ -0,0 +1,8 @@
|
|||
FROM debian:testing
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'sed -i "s/main/main contrib/g" /etc/apt/sources.list'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y && apt-get -o=Dpkg::Use-Pty=0 -q install -y android-sdk google-android-ndk-installer'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q -y install wget git pkg-config'
|
||||
RUN /bin/bash -c 'wget https://services.gradle.org/distributions/gradle-6.3-bin.zip -O /tmp/gradle.zip && unzip -d /opt/ /tmp/gradle.zip && ln -s /opt/gradle*/bin/gradle /usr/local/bin/gradle && rm -f /tmp/gradle.zip'
|
||||
RUN /bin/bash -c 'git clone https://github.com/Shadowstyler/android-sdk-licenses.git /tmp/android-sdk-licenses && cp -a /tmp/android-sdk-licenses/*-license /usr/lib/android-sdk/licenses && rm -rf /tmp/android-sdk-licenses'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q -y install automake libtool'
|
3
contrib/ci/docker/debian-sid.dockerfile
Normal file
3
contrib/ci/docker/debian-sid.dockerfile
Normal file
|
@ -0,0 +1,3 @@
|
|||
FROM debian:sid
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y && apt-get -o=Dpkg::Use-Pty=0 -q install -y eatmydata gdb cmake git ninja-build pkg-config ccache clang-11 libsodium-dev libsystemd-dev python3-dev libuv1-dev libunbound-dev nettle-dev libssl-dev libevent-dev libsqlite3-dev'
|
3
contrib/ci/docker/debian-stable.dockerfile
Normal file
3
contrib/ci/docker/debian-stable.dockerfile
Normal file
|
@ -0,0 +1,3 @@
|
|||
FROM debian:stable
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y && apt-get -o=Dpkg::Use-Pty=0 -q install -y eatmydata gdb cmake git ninja-build pkg-config ccache g++ libsodium-dev libsystemd-dev python3-dev libuv1-dev libunbound-dev nettle-dev libssl-dev libevent-dev libsqlite3-dev'
|
4
contrib/ci/docker/debian-win32-cross.dockerfile
Normal file
4
contrib/ci/docker/debian-win32-cross.dockerfile
Normal file
|
@ -0,0 +1,4 @@
|
|||
FROM debian:testing
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y && apt-get -o=Dpkg::Use-Pty=0 -q install -y eatmydata build-essential cmake git ninja-build pkg-config ccache g++-mingw-w64-x86-64-posix nsis zip automake libtool'
|
||||
RUN /bin/bash -c 'update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix && update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix'
|
3
contrib/ci/docker/lint.dockerfile
Normal file
3
contrib/ci/docker/lint.dockerfile
Normal file
|
@ -0,0 +1,3 @@
|
|||
FROM debian:sid
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q install -y eatmydata git clang-format-9'
|
8
contrib/ci/docker/readme.md
Normal file
8
contrib/ci/docker/readme.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
## drone-ci docker jizz
|
||||
|
||||
To rebuild all ci images and push them to a registry server do:
|
||||
|
||||
$ docker login your.registry.here
|
||||
$ ./rebuild-docker-images.sh your.registry.here *.dockerfile
|
||||
|
||||
The docker images will be `your.registry.here/lokinet-ci-*`for each *.dockerfile in this directory
|
13
contrib/ci/docker/rebuild-docker-images.sh
Executable file
13
contrib/ci/docker/rebuild-docker-images.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# the registry server to use
|
||||
registry=$1
|
||||
|
||||
test "x$registry" != "x" || exit 1
|
||||
|
||||
for file in ${@:2} ; do
|
||||
name="$(echo $file | cut -d'.' -f1)"
|
||||
echo "rebuild $name"
|
||||
docker build -f $file -t $registry/lokinet-ci-$name --pull --no-cache --quiet .
|
||||
docker push $registry/lokinet-ci-$name
|
||||
done
|
3
contrib/ci/docker/ubuntu-bionic.dockerfile
Normal file
3
contrib/ci/docker/ubuntu-bionic.dockerfile
Normal file
|
@ -0,0 +1,3 @@
|
|||
FROM ubuntu:bionic
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y && apt-get -o=Dpkg::Use-Pty=0 -q install -y eatmydata gdb cmake git ninja-build pkg-config ccache g++-8 python3-dev automake libtool'
|
3
contrib/ci/docker/ubuntu-focal.dockerfile
Normal file
3
contrib/ci/docker/ubuntu-focal.dockerfile
Normal file
|
@ -0,0 +1,3 @@
|
|||
FROM ubuntu:focal
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y && apt-get -o=Dpkg::Use-Pty=0 -q install -y eatmydata gdb cmake git ninja-build pkg-config ccache g++ libsodium-dev libsystemd-dev python3-dev libuv1-dev libunbound-dev nettle-dev libssl-dev libevent-dev libsqlite3-dev'
|
|
@ -1,9 +0,0 @@
|
|||
FROM alpine:edge as builder
|
||||
|
||||
RUN apk update && \
|
||||
apk --no-cache add --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing build-base cmake git libcap-dev libcap-static libuv-dev libuv-static curl ninja bash binutils-gold mingw-w64-gcc
|
||||
|
||||
WORKDIR /src/
|
||||
COPY . /src/
|
||||
|
||||
RUN make windows-release NINJA=ninja STATIC_LINK=ON DOWNLOAD_SODIUM=ON
|
|
@ -1,8 +0,0 @@
|
|||
FROM compose-base:latest
|
||||
|
||||
ENV LOKINET_NETID=docker
|
||||
|
||||
COPY ./docker/compose/bootstrap.ini /root/.lokinet/lokinet.ini
|
||||
|
||||
CMD ["/lokinet"]
|
||||
EXPOSE 1090/udp 1190/tcp
|
|
@ -1,59 +0,0 @@
|
|||
[router]
|
||||
# number of crypto worker threads
|
||||
threads=4
|
||||
# path to store signed RC
|
||||
contact-file=/root/.lokinet/self.signed
|
||||
# path to store transport private key
|
||||
transport-privkey=/root/.lokinet/transport.private
|
||||
# path to store identity signing key
|
||||
ident-privkey=/root/.lokinet/identity.private
|
||||
# encryption key for onion routing
|
||||
encryption-privkey=/root/.lokinet/encryption.private
|
||||
block-bogons=false
|
||||
|
||||
# uncomment following line to set router nickname to 'lokinet'
|
||||
nickname=bootstrap
|
||||
|
||||
[logging]
|
||||
level=info
|
||||
|
||||
[metrics]
|
||||
json-metrics-path=/root/.lokinet/metrics.json
|
||||
|
||||
# admin api (disabled by default)
|
||||
[api]
|
||||
enabled=true
|
||||
bind=127.0.0.1:1190
|
||||
|
||||
# system settings for privileges and such
|
||||
[system]
|
||||
user=lokinet
|
||||
group=lokinet
|
||||
pidfile=/root/.lokinet/lokinet.pid
|
||||
|
||||
# dns provider configuration section
|
||||
[dns]
|
||||
# resolver
|
||||
upstream=1.1.1.1
|
||||
bind=127.3.2.1:53
|
||||
|
||||
# network database settings block
|
||||
[netdb]
|
||||
# directory for network database skiplist storage
|
||||
dir=/netdb
|
||||
|
||||
# lokid settings (disabled by default)
|
||||
[lokid]
|
||||
enabled=false
|
||||
jsonrpc=127.0.0.1:22023
|
||||
|
||||
# network settings
|
||||
[network]
|
||||
profiles=/root/.lokinet/profiles.dat
|
||||
enabled=true
|
||||
exit=false
|
||||
ifname=loki-docker0
|
||||
|
||||
# ROUTERS ONLY: publish network interfaces for handling inbound traffic
|
||||
[bind]
|
||||
eth0=1090
|
|
@ -1,6 +0,0 @@
|
|||
FROM compose-base:latest
|
||||
|
||||
COPY ./docker/compose/client.ini /root/.lokinet/lokinet.ini
|
||||
|
||||
CMD ["/lokinet"]
|
||||
EXPOSE 1090/udp 1190/tcp
|
|
@ -1,52 +0,0 @@
|
|||
[router]
|
||||
# number of crypto worker threads
|
||||
threads=4
|
||||
# path to store signed RC
|
||||
contact-file=/root/.lokinet/self.signed
|
||||
# path to store transport private key
|
||||
transport-privkey=/root/.lokinet/transport.private
|
||||
# path to store identity signing key
|
||||
ident-privkey=/root/.lokinet/identity.private
|
||||
# encryption key for onion routing
|
||||
encryption-privkey=/root/.lokinet/encryption.private
|
||||
block-bogons=false
|
||||
|
||||
[logging]
|
||||
level=info
|
||||
|
||||
[metrics]
|
||||
json-metrics-path=/root/.lokinet/metrics.json
|
||||
|
||||
# admin api (disabled by default)
|
||||
[api]
|
||||
enabled=true
|
||||
bind=127.0.0.1:1190
|
||||
|
||||
# system settings for privileges and such
|
||||
[system]
|
||||
user=lokinet
|
||||
group=lokinet
|
||||
pidfile=/root/.lokinet/lokinet.pid
|
||||
|
||||
# dns provider configuration section
|
||||
[dns]
|
||||
# resolver
|
||||
upstream=1.1.1.1
|
||||
bind=127.0.0.1:53
|
||||
|
||||
# network database settings block
|
||||
[netdb]
|
||||
# directory for network database skiplist storage
|
||||
dir=/netdb
|
||||
|
||||
# lokid settings (disabled by default)
|
||||
[lokid]
|
||||
enabled=false
|
||||
jsonrpc=127.0.0.1:22023
|
||||
|
||||
# network settings
|
||||
[network]
|
||||
profiles=/root/.lokinet/profiles.dat
|
||||
enabled=true
|
||||
exit=false
|
||||
ifname=loki-docker0
|
|
@ -1,16 +0,0 @@
|
|||
ARG LOKINET_NETID=docker
|
||||
|
||||
FROM alpine:edge as builder
|
||||
|
||||
RUN apk update && \
|
||||
apk add build-base cmake git libcap-dev libcap-static libuv-dev libuv-static curl ninja bash binutils-gold
|
||||
|
||||
WORKDIR /src/
|
||||
COPY . /src/
|
||||
|
||||
RUN make NINJA=ninja STATIC_LINK=ON BUILD_TYPE=Release
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
COPY --from=builder /src/build/daemon/lokinet /
|
||||
COPY --from=builder /src/build/daemon/lokinet-ctl /
|
|
@ -1,87 +0,0 @@
|
|||
version: '3.4'
|
||||
services:
|
||||
bootstrap-router:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/compose/bootstrap.Dockerfile
|
||||
image: bootstrap
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
devices:
|
||||
- "/dev/net/tun:/dev/net/tun"
|
||||
ports:
|
||||
- target: 1090
|
||||
protocol: udp
|
||||
- target: 1190
|
||||
protocol: tcp
|
||||
volumes:
|
||||
- bootstrap-dir:/root/.lokinet/
|
||||
environment:
|
||||
- LOKINET_NETID=docker
|
||||
networks:
|
||||
testing_net:
|
||||
|
||||
router:
|
||||
depends_on:
|
||||
- bootstrap-router
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/compose/router.Dockerfile
|
||||
image: router
|
||||
devices:
|
||||
- "/dev/net/tun:/dev/net/tun"
|
||||
ports:
|
||||
- target: 1090
|
||||
protocol: udp
|
||||
mode: host
|
||||
- target: 1190
|
||||
protocol: tcp
|
||||
mode: host
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
volumes:
|
||||
- bootstrap-dir:/bootstrap/
|
||||
environment:
|
||||
- LOKINET_NETID=docker
|
||||
networks:
|
||||
testing_net:
|
||||
|
||||
client:
|
||||
depends_on:
|
||||
- bootstrap-router
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/compose/router.Dockerfile
|
||||
image: router
|
||||
devices:
|
||||
- "/dev/net/tun:/dev/net/tun"
|
||||
ports:
|
||||
- target: 1090
|
||||
protocol: udp
|
||||
mode: host
|
||||
- target: 1190
|
||||
protocol: tcp
|
||||
mode: host
|
||||
- target: 53
|
||||
protocol: tcp
|
||||
mode: host
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
volumes:
|
||||
- bootstrap-dir:/bootstrap/
|
||||
environment:
|
||||
- LOKINET_NETID=docker
|
||||
networks:
|
||||
testing_net:
|
||||
|
||||
volumes:
|
||||
bootstrap-dir:
|
||||
|
||||
networks:
|
||||
testing_net:
|
||||
driver: bridge
|
||||
internal: true
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 172.28.0.0/16
|
|
@ -1,6 +0,0 @@
|
|||
FROM compose-base:latest
|
||||
|
||||
COPY ./docker/compose/router.ini /root/.lokinet/lokinet.ini
|
||||
|
||||
CMD ["/lokinet"]
|
||||
EXPOSE 1090/udp 1190/tcp
|
|
@ -1,72 +0,0 @@
|
|||
[router]
|
||||
# number of crypto worker threads
|
||||
threads=4
|
||||
# path to store signed RC
|
||||
contact-file=/root/.lokinet/self.signed
|
||||
# path to store transport private key
|
||||
transport-privkey=/root/.lokinet/transport.private
|
||||
# path to store identity signing key
|
||||
ident-privkey=/root/.lokinet/identity.private
|
||||
# encryption key for onion routing
|
||||
encryption-privkey=/root/.lokinet/encryption.private
|
||||
block-bogons=false
|
||||
|
||||
# uncomment following line to set router nickname to 'lokinet'
|
||||
#nickname=lokinet
|
||||
|
||||
|
||||
[logging]
|
||||
level=info
|
||||
# uncomment for logging to file
|
||||
#type=file
|
||||
#file=/path/to/logfile
|
||||
# uncomment for syslog logging
|
||||
#type=syslog
|
||||
|
||||
[metrics]
|
||||
json-metrics-path=/root/.lokinet/metrics.json
|
||||
|
||||
# admin api (disabled by default)
|
||||
[api]
|
||||
enabled=true
|
||||
bind=127.0.0.1:1190
|
||||
|
||||
# system settings for privileges and such
|
||||
[system]
|
||||
user=lokinet
|
||||
group=lokinet
|
||||
pidfile=/root/.lokinet/lokinet.pid
|
||||
|
||||
# dns provider configuration section
|
||||
[dns]
|
||||
# resolver
|
||||
upstream=1.1.1.1
|
||||
bind=127.3.2.1:53
|
||||
|
||||
# network database settings block
|
||||
[netdb]
|
||||
# directory for network database skiplist storage
|
||||
dir=/netdb
|
||||
|
||||
# bootstrap settings
|
||||
[bootstrap]
|
||||
# add a bootstrap node's signed identity to the list of nodes we want to bootstrap from
|
||||
# if we don't have any peers we connect to this router
|
||||
add-node=/bootstrap/self.signed
|
||||
|
||||
# lokid settings (disabled by default)
|
||||
[lokid]
|
||||
enabled=false
|
||||
jsonrpc=127.0.0.1:22023
|
||||
|
||||
# network settings
|
||||
[network]
|
||||
profiles=/root/.lokinet/profiles.dat
|
||||
enabled=true
|
||||
exit=false
|
||||
ifaddr=10.200.0.1/8
|
||||
ifname=loki-docker0
|
||||
|
||||
# ROUTERS ONLY: publish network interfaces for handling inbound traffic
|
||||
[bind]
|
||||
eth0=1090
|
|
@ -1,10 +0,0 @@
|
|||
FROM debian:stable
|
||||
|
||||
RUN apt update && \
|
||||
apt install -y build-essential cmake git libcap-dev curl ninja-build
|
||||
|
||||
WORKDIR /src/
|
||||
|
||||
COPY . /src/
|
||||
|
||||
RUN make NINJA=ninja JSONRPC=ON && make install NINJA=ninja
|
|
@ -1,11 +0,0 @@
|
|||
FROM fedora:latest
|
||||
|
||||
RUN dnf update -y && \
|
||||
dnf upgrade -y && \
|
||||
dnf install -y cmake make git gcc gcc-c++ libcap-devel curl
|
||||
|
||||
WORKDIR /src/
|
||||
|
||||
COPY . /src/
|
||||
|
||||
RUN make -j8 JSONRPC=ON
|
|
@ -1,14 +0,0 @@
|
|||
FROM gcc:latest
|
||||
|
||||
RUN apt update && \
|
||||
apt install -y cmake git libcap-dev curl ninja-build libuv1-dev
|
||||
|
||||
WORKDIR /src/
|
||||
|
||||
COPY . /src/
|
||||
|
||||
RUN mkdir build && \
|
||||
cd build && \
|
||||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DWARNINGS_AS_ERRORS=ON -DDOWNLOAD_SODIUM=ON && \
|
||||
ninja -k0 && \
|
||||
./test/testAll
|
|
@ -1,12 +0,0 @@
|
|||
FROM debian:stable
|
||||
|
||||
RUN apt update && \
|
||||
apt install -y build-essential cmake git libcap-dev curl python3-dev python3-setuptools libsodium-dev
|
||||
|
||||
WORKDIR /src/
|
||||
|
||||
COPY . /src/
|
||||
|
||||
RUN make -j 8 SHARED_LIB=ON JSONRPC=ON && make kubernetes-install
|
||||
|
||||
ENTRYPOINT [ "/usr/bin/python3", "-m", "pylokinet"]
|
|
@ -1,20 +0,0 @@
|
|||
ARG bootstrap="https://i2p.rocks/i2procks.signed"
|
||||
FROM alpine:edge as builder
|
||||
|
||||
RUN apk update && \
|
||||
apk add build-base cmake git libcap-dev libcap-static libuv-dev libuv-static curl ninja bash binutils-gold curl-dev
|
||||
|
||||
WORKDIR /src/
|
||||
COPY . /src/
|
||||
|
||||
RUN make NINJA=ninja STATIC_LINK=ON BUILD_TYPE=Release DOWNLOAD_SODIUM=ON
|
||||
RUN ./lokinet-bootstrap ${bootstrap}
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
COPY lokinet-docker.ini /root/.lokinet/lokinet.ini
|
||||
COPY --from=builder /src/build/daemon/lokinet .
|
||||
COPY --from=builder /root/.lokinet/bootstrap.signed /root/.lokinet/
|
||||
|
||||
CMD ["./lokinet"]
|
||||
EXPOSE 1090/udp 1190/tcp
|
|
@ -1,14 +0,0 @@
|
|||
FROM ubuntu:xenial
|
||||
|
||||
RUN apt update && \
|
||||
apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common wget && \
|
||||
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - && \
|
||||
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main' && \
|
||||
apt-get update && \
|
||||
apt install -y build-essential cmake git libcap-dev curl ninja-build libuv1-dev
|
||||
|
||||
WORKDIR /src/
|
||||
|
||||
COPY . /src/
|
||||
|
||||
RUN make NINJA=ninja JSONRPC=ON STATIC_LINK=ON
|
Loading…
Reference in a new issue