Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker and docker-compose files for openSUSE and Arch Linux #480

Merged
merged 2 commits into from
Nov 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions docker/Dockerfile.arch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM archlinux/base

ARG java_version=8
ENV JAVA_VERSION $java_version

# install dependencies
# use openSSL 1.0.x for now, for highest compatibility
RUN pacman -Sy --noconfirm --needed \
apr \
autoconf \
automake \
bzip2 \
cmake \
git \
glibc \
gcc \
gnupg \
go \
gzip \
jdk${JAVA_VERSION}-openjdk \
openssl-1.0 \
libtool \
lsb-release \
make \
ninja \
perl \
tar \
unzip \
wget \
which
33 changes: 33 additions & 0 deletions docker/Dockerfile.opensuse
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ARG opensuse_version=15.1
FROM opensuse/leap:$opensuse_version
# needed to do again after FROM due to docker limitation
ARG opensuse_version

ARG java_version=1.8.0
ENV JAVA_VERSION $java_version

# install dependencies
# use openSSL 1.0.x for now, for highest compatibility
RUN zypper install --force-resolution --no-recommends --no-confirm \
apr-devel \
autoconf \
automake \
bzip2 \
cmake \
git \
glibc-devel \
gcc \
gcc-c++ \
go \
gpg2 \
gzip \
java-${JAVA_VERSION}-devel \
libopenssl-1_0_0-devel \
libtool \
lsb-release \
make \
ninja \
perl \
tar \
unzip \
wget
12 changes: 12 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ cd /path/to/netty-tcnative/
cd /path/to/netty-tcnative/
```

## Arch Linux with java 8

```
docker-compose -f docker/docker-compose.arch.yaml -f docker/docker-compose.arch-18.yaml run build
```

## centos 6 with java 8

```
Expand All @@ -21,5 +27,11 @@ docker-compose -f docker/docker-compose.centos.yaml -f docker/docker-compose.cen
docker-compose -f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-7.18.yaml run build
```

## openSUSE Leap 15.1 with java 8

```
docker-compose -f docker/docker-compose.opensuse.yaml -f docker/docker-compose.opensuse-151.18.yaml run build
```

etc, etc

15 changes: 15 additions & 0 deletions docker/docker-compose.arch-18.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: "3"

services:

runtime-setup:
image: netty-tcnative-arch:arch-1.8
build:
args:
java_version : "8"

build:
image: netty-tcnative-arch:arch-1.8

shell:
image: netty-tcnative-arch:arch-1.8
36 changes: 36 additions & 0 deletions docker/docker-compose.arch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: "3"

services:

runtime-setup:
image: netty-tcnative-arch:default
build:
context: .
dockerfile: Dockerfile.arch

common: &common
image: netty-tcnative-arch:default
depends_on: [runtime-setup]
volumes:
- ~/.ssh:/root/.ssh
- ~/.gnupg:/root/.gnupg
- ..:/code
working_dir: /code

build:
<<: *common
command: /bin/bash -cl "./mvnw clean package"

shell:
<<: *common
environment:
- SANOTYPE_USER
- SANOTYPE_PASSWORD
volumes:
- ~/.ssh:/root/.ssh
- ~/.gnupg:/root/.gnupg
- ~/.m2:/root/.m2
- ~/.gitconfig:/root/.gitconfig
- ~/.gitignore:/root/.gitignore
- ..:/code
entrypoint: /bin/bash
16 changes: 16 additions & 0 deletions docker/docker-compose.opensuse-151.18.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "3"

services:

runtime-setup:
image: netty-tcnative-opensuse:opensuse-15.1-1.8
build:
args:
opensuse_version : "15.1"
java_version : "1.8.0"

build:
image: netty-tcnative-opensuse:opensuse-15.1-1.8

shell:
image: netty-tcnative-opensuse:opensuse-15.1-1.8
36 changes: 36 additions & 0 deletions docker/docker-compose.opensuse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: "3"

services:

runtime-setup:
image: netty-tcnative-opensuse:default
build:
context: .
dockerfile: Dockerfile.opensuse

common: &common
image: netty-tcnative-opensuse:default
depends_on: [runtime-setup]
volumes:
- ~/.ssh:/root/.ssh
- ~/.gnupg:/root/.gnupg
- ..:/code
working_dir: /code

build:
<<: *common
command: /bin/bash -cl "./mvnw clean package"

shell:
<<: *common
environment:
- SANOTYPE_USER
- SANOTYPE_PASSWORD
volumes:
- ~/.ssh:/root/.ssh
- ~/.gnupg:/root/.gnupg
- ~/.m2:/root/.m2
- ~/.gitconfig:/root/.gitconfig
- ~/.gitignore:/root/.gitignore
- ..:/code
entrypoint: /bin/bash