Skip to content

Commit 7a47739

Browse files
authored
Update Docker image and docker build per PR (#286)
1 parent 2e3d5a8 commit 7a47739

File tree

7 files changed

+68
-121
lines changed

7 files changed

+68
-121
lines changed

.github/workflows/build.yaml

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
## on: [push, pull_request]
21
on:
32
pull_request:
43
paths-ignore:
@@ -7,41 +6,36 @@ on:
76
- 'assets/**'
87
- '**.md'
98

10-
name: Continuous Integration
9+
name: Parseable CI Workflow
1110

1211
jobs:
13-
# docker:
14-
# name: Docker Build & Push
12+
13+
# docker-compose-test:
14+
# name: Docker Compose integration tests
1515
# runs-on: ubuntu-latest
1616
# steps:
17-
# - name: Docker meta
18-
# id: meta
19-
# uses: docker/metadata-action@v4
20-
# with:
21-
# images: |
22-
# parseable/parseable
23-
# tags: |
24-
# type=sha
25-
# - name: Set up QEMU
26-
# uses: docker/setup-qemu-action@v2
27-
# - name: Set up Docker Buildx
28-
# uses: docker/setup-buildx-action@v2
29-
# - name: Login to DockerHub
30-
# uses: docker/login-action@v2
31-
# with:
32-
# username: ${{ secrets.DOCKERHUB_USERNAME }}
33-
# password: ${{ secrets.DOCKERHUB_TOKEN }}
34-
# - name: Build and push
35-
# uses: docker/build-push-action@v3
36-
# with:
37-
# push: true
38-
# tags: ${{ steps.meta.outputs.tags }}
17+
# - name: Checkout
18+
# uses: actions/checkout@v3
19+
# - name: Start compose
20+
# run: docker-compose -f "docker-compose.yaml" up --build
21+
# - name: Stop compose
22+
# if: always()
23+
# run: docker-compose -f "docker-compose.yaml" down
24+
25+
docker-build:
26+
name: Docker build
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v3
31+
- name: Build Docker image
32+
run: docker build .
3933

40-
test:
41-
name: Test Suite
34+
unit-tests:
35+
name: Unit tests
4236
runs-on: ubuntu-latest
4337
steps:
44-
- uses: actions/checkout@v2
38+
- uses: actions/checkout@v3
4539
- uses: actions-rs/toolchain@v1
4640
with:
4741
profile: minimal
@@ -52,10 +46,10 @@ jobs:
5246
command: test
5347

5448
fmt:
55-
name: Rustfmt
49+
name: Rust fmt check
5650
runs-on: ubuntu-latest
5751
steps:
58-
- uses: actions/checkout@v2
52+
- uses: actions/checkout@v3
5953
- uses: actions-rs/toolchain@v1
6054
with:
6155
profile: minimal
@@ -68,10 +62,10 @@ jobs:
6862
args: --all -- --check
6963

7064
clippy:
71-
name: Clippy
65+
name: Cargo Clippy check
7266
runs-on: ubuntu-latest
7367
steps:
74-
- uses: actions/checkout@v2
68+
- uses: actions/checkout@v3
7569
- uses: actions-rs/toolchain@v1
7670
with:
7771
profile: minimal

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,22 @@
1313
# You should have received a copy of the GNU Affero General Public License
1414
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1515

16-
FROM rust:1.67.0 as builder
16+
17+
FROM rust:slim-bullseye as builder
18+
19+
LABEL org.opencontainers.image.title="Parseable"
20+
LABEL maintainer="Parseable Team <[email protected]>"
21+
LABEL org.opencontainers.image.vendor="Cloudnatively Pvt Ltd"
22+
LABEL org.opencontainers.image.licenses="AGPL-3.0"
1723

1824
WORKDIR /parseable
1925

2026
COPY . .
21-
2227
RUN cargo build --release
23-
24-
FROM gcr.io/distroless/cc:latest
2528

26-
WORKDIR /parseable
29+
FROM gcr.io/distroless/cc-debian11:nonroot
2730

28-
COPY --from=builder /parseable/target/release/parseable /usr/local/bin/parseable
31+
WORKDIR /parseable
32+
COPY --from=builder /parseable/target/release/parseable /usr/bin/parseable
2933

30-
CMD ["/usr/local/bin/parseable"]
34+
CMD ["parseable"]

Dockerfile.release

Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Parseable Server (C) 2022 - 2023 Parseable, Inc.
1+
# Copyright (C) 2023 Parseable, Inc.
22
#
33
# This program is free software: you can redistribute it and/or modify
44
# it under the terms of the GNU Affero General Public License as
@@ -13,22 +13,23 @@
1313
# You should have received a copy of the GNU Affero General Public License
1414
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1515

16-
# Compile
17-
FROM rust:1.67-alpine AS compiler
16+
FROM registry.access.redhat.com/ubi8/ubi:latest as builder
17+
18+
LABEL org.opencontainers.image.title="Parseable"
19+
LABEL maintainer="Parseable Team <[email protected]>"
20+
LABEL org.opencontainers.image.vendor="Cloudnatively Pvt Ltd"
21+
LABEL org.opencontainers.image.licenses="AGPL-3.0"
1822

1923
WORKDIR /parseable
2024

21-
RUN apk add --no-cache musl-dev
25+
RUN yum install -y rust-toolset-1.67.0
2226

2327
COPY . .
2428

25-
RUN set -eux; \
26-
apkArch="$(apk --print-arch)"; \
27-
if [ "$apkArch" = "aarch64" ]; then \
28-
export JEMALLOC_SYS_WITH_LG_PAGE=16; \
29-
fi && \
30-
cargo build --release --target x86_64-unknown-linux-musl
29+
RUN cargo build --release --target x86_64-unknown-linux-gnu
30+
31+
FROM registry.access.redhat.com/ubi8/ubi:minimal
3132

32-
FROM scratch AS export-stage
33+
COPY --from=builder /parseable/target/x86_64-unknown-linux-gnu/release/parseable /usr/bin/parseable
3334

34-
COPY --from=compiler parseable/target/x86_64-unknown-linux-musl/release/parseable parseable
35+
CMD ["parseable"]

docker-compose.yaml

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
version: "3.7"
22

33
networks:
4-
parseable:
4+
parseable-internal:
5+
driver: bridge
56

67
services:
78

@@ -27,11 +28,14 @@ services:
2728
timeout: 20s
2829
retries: 5
2930
networks:
30-
- parseable
31+
- parseable-internal
3132

3233
parseable:
33-
image: parseable/parseable:v0.2.1
34-
command: ["parseable", "s3-store"]
34+
image: parseablehq/parseable:v0.2.1
35+
# build:
36+
# context: .
37+
# dockerfile: Dockerfile
38+
# command: ["parseable", "s3-store"]
3539
ports:
3640
- 8000
3741
environment:
@@ -44,7 +48,7 @@ services:
4448
- P_USERNAME=admin
4549
- P_PASSWORD=admin
4650
networks:
47-
- parseable
51+
- parseable-internal
4852
healthcheck:
4953
test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v1/liveness" ]
5054
interval: 15s
@@ -53,28 +57,15 @@ services:
5357
depends_on:
5458
- minio
5559

56-
quest-smoke:
57-
image: parseable/quest:v0.1
60+
quest:
61+
image: ghcr.io/parseablehq/quest:main
5862
command: ["smoke", "http://parseable:8000", "admin", "admin"]
5963
networks:
60-
- parseable
64+
- parseable-internal
6165
depends_on:
6266
- parseable
6367
deploy:
6468
restart_policy:
6569
condition: on-failure
6670
delay: 10s
67-
max_attempts: 10
68-
69-
quest-load:
70-
image: parseable/quest:v0.1
71-
command: ["load", "http://parseable:8000", "admin", "admin"]
72-
networks:
73-
- parseable
74-
depends_on:
75-
- quest-smoke
76-
deploy:
77-
restart_policy:
78-
condition: on-failure
79-
delay: 10s
80-
max_attempts: 10
71+
max_attempts: 3

server/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ ureq = { version = "2.6", features = ["json"] }
7070
hex = "0.4"
7171
itertools = "0.10"
7272
xxhash-rust = { version = "0.8", features = ["xxh3"] }
73+
xz2 = { version = "*", features=["static"] }
74+
bzip2 = { version = "*", features=["static"] }
7375

7476
[build-dependencies]
7577
static-files = "0.2"

0 commit comments

Comments
 (0)