Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ asn1c_combined/libasncodec.a
# Ignore files added by CLion
.idea/
cmake-build-*/

# Ignore Python bytecode files (generated during `do_kafka_test.sh` execution)
*.pyc
27 changes: 16 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# === RUNTIME DEPENDENCIES IMAGE ===
FROM alpine:3.18 as runtime-deps

Check warning on line 2 in Dockerfile

View workflow job for this annotation

GitHub Actions / build / build

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]

# add runtime dependencies
RUN apk add --upgrade --no-cache \
bash \
librdkafka \
librdkafka-dev


# === BUILDER IMAGE ===
FROM alpine:3.18 as builder
FROM runtime-deps as builder

Check warning on line 15 in Dockerfile

View workflow job for this annotation

GitHub Actions / build / build

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]
Expand All @@ -9,9 +22,6 @@
cmake \
g++ \
make \
bash \
librdkafka \
librdkafka-dev \
asio-dev

# Install pugixml
Expand Down Expand Up @@ -50,18 +60,13 @@
# Build acm.
RUN mkdir -p /build && cd /build && cmake /asn1_codec && make


# === RUNTIME IMAGE ===
FROM alpine:3.18
FROM runtime-deps
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]

# add runtime dependencies
RUN apk add --upgrade --no-cache \
bash \
librdkafka \
librdkafka-dev

# copy the built files from the builder
COPY --from=builder /asn1_codec /asn1_codec
COPY --from=builder /build /build
Expand Down
31 changes: 16 additions & 15 deletions Dockerfile.amazonlinux
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
# === BUILDER IMAGE for ACM ===
FROM amazonlinux:2023 as builder
# === RUNTIME DEPENDENCIES IMAGE ===
FROM amazonlinux:2023 as runtime-deps
USER root
WORKDIR /asn1_codec
## add build dependencies
RUN yum install -y cmake g++ make bash automake libtool autoconf
VOLUME ["/asn1_codec_share"]

# # add runtime dependencies
RUN yum install -y bash

# Install librdkafka from Confluent repo
RUN rpm --import https://packages.confluent.io/rpm/7.6/archive.key
COPY ./confluent.repo /etc/yum.repos.d
RUN yum clean all
RUN yum install -y librdkafka-devel


# === BUILDER IMAGE for ACM ===
FROM runtime-deps as builder
USER root
WORKDIR /asn1_codec

## add build dependencies
RUN yum install -y cmake g++ make bash automake libtool autoconf

# Install asio from Fedora repo (build dependency only)
COPY ./fedora.repo /etc/yum.repos.d
RUN dnf --enablerepo=fedora install asio-devel -y
Expand Down Expand Up @@ -46,22 +57,12 @@ ADD ./data /asn1_codec/data
RUN mkdir -p /build && cd /build && cmake /asn1_codec && make



# === RUNTIME IMAGE ===
FROM amazonlinux:2023
FROM runtime-deps
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]

# # add runtime dependencies
RUN yum install -y bash

# Install librdkafka from Confluent repo
RUN rpm --import https://packages.confluent.io/rpm/7.6/archive.key
COPY ./confluent.repo /etc/yum.repos.d
RUN yum clean all
RUN yum install -y librdkafka-devel

# # copy the built files from the builder
COPY --from=builder /asn1_codec /asn1_codec
COPY --from=builder /build /build
Expand Down
30 changes: 15 additions & 15 deletions Dockerfile.debug
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# === RUNTIME DEPENDENCIES IMAGE ===
FROM alpine:3.18 as runtime-deps
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]

# add runtime dependencies
RUN apk add --upgrade --no-cache \
bash \
librdkafka \
librdkafka-dev


# === BUILDER IMAGE ===
FROM alpine:3.18 as builder
FROM runtime-deps as builder
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]
Expand All @@ -9,9 +22,6 @@ RUN apk add --upgrade --no-cache --virtual .build-deps \
cmake \
g++ \
make \
bash \
librdkafka \
librdkafka-dev \
asio-dev

# Install pugixml
Expand All @@ -23,8 +33,6 @@ RUN export LD_LIBRARY_PATH=/usr/local/lib
ADD ./asn1c_combined /asn1_codec/asn1c_combined
RUN cd /asn1_codec/asn1c_combined && bash doIt.sh



# Remove any lingering .asn files
RUN rm -rf /asn1c_codec/asn1c_combined/j2735-asn-files
RUN rm -rf /asn1c_codec/asn1c_combined/semi-asn-files
Expand Down Expand Up @@ -53,20 +61,12 @@ RUN echo "export CC=gcc" >> ~/.bashrc
RUN mkdir -p /build && cd /build && cmake /asn1_codec && make




# === RUNTIME IMAGE ===
FROM alpine:3.18
FROM runtime-deps
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]

# add runtime dependencies
RUN apk add --upgrade --no-cache \
bash \
librdkafka \
librdkafka-dev

# Use jemalloc
RUN apk add --upgrade --no-cache jemalloc
ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2
Expand Down
27 changes: 16 additions & 11 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# === RUNTIME DEPENDENCIES IMAGE ===
FROM alpine:3.18 as runtime-deps
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]

# add runtime dependencies
RUN apk add --upgrade --no-cache \
bash \
librdkafka \
librdkafka-dev


# === BUILDER IMAGE ===
FROM alpine:3.18 as builder
FROM runtime-deps as builder
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]
Expand All @@ -9,9 +22,6 @@ RUN apk add --upgrade --no-cache --virtual .build-deps \
cmake \
g++ \
make \
bash \
librdkafka \
librdkafka-dev \
asio-dev

# Install pugixml
Expand Down Expand Up @@ -49,18 +59,13 @@ RUN echo "export CC=gcc" >> ~/.bashrc
# Build acm.
RUN mkdir -p /build && cd /build && cmake /asn1_codec && make


# === RUNTIME IMAGE ===
FROM alpine:3.18
FROM runtime-deps
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]

# add runtime dependencies
RUN apk add --upgrade --no-cache \
bash \
librdkafka \
librdkafka-dev

# Use jemalloc
RUN apk add --upgrade --no-cache jemalloc
ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2
Expand Down
27 changes: 16 additions & 11 deletions Dockerfile.standalone
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# === RUNTIME DEPENDENCIES IMAGE ===
FROM alpine:3.18 as runtime-deps
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]

# add runtime dependencies
RUN apk add --upgrade --no-cache \
bash \
librdkafka \
librdkafka-dev


# === BUILDER IMAGE ===
FROM alpine:3.18 as builder
FROM runtime-deps as builder
USER root
WORKDIR /asn1_codec

Expand All @@ -8,9 +21,6 @@ RUN apk add --upgrade --no-cache --virtual .build-deps \
cmake \
g++ \
make \
bash \
librdkafka \
librdkafka-dev \
asio-dev

# Install pugixml
Expand Down Expand Up @@ -43,17 +53,12 @@ ADD ./data /asn1_codec/data
# Build acm.
RUN mkdir -p /build && cd /build && cmake /asn1_codec && make


# === RUNTIME IMAGE ===
FROM alpine:3.18
FROM runtime-deps
USER root
WORKDIR /asn1_codec

# add runtime dependencies
RUN apk add --upgrade --no-cache \
bash \
librdkafka \
librdkafka-dev

# Use jemalloc
RUN apk add --upgrade --no-cache jemalloc
ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2
Expand Down
28 changes: 16 additions & 12 deletions Dockerfile.testing
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# === RUNTIME DEPENDENCIES IMAGE ===
FROM alpine:3.18 as runtime-deps
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]

# add runtime dependencies
RUN apk add --upgrade --no-cache \
bash \
python3 \
librdkafka \
librdkafka-dev


# === BUILDER IMAGE ===
FROM alpine:3.18 as builder
FROM runtime-deps as builder
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]
Expand All @@ -9,9 +23,6 @@ RUN apk add --upgrade --no-cache --virtual .build-deps \
cmake \
g++ \
make \
bash \
librdkafka \
librdkafka-dev \
asio-dev

# Install pugixml
Expand Down Expand Up @@ -52,18 +63,11 @@ RUN echo "export CC=gcc" >> ~/.bashrc
RUN mkdir -p /build && cd /build && cmake /asn1_codec && make

# === RUNTIME IMAGE ===
FROM alpine:3.18
FROM runtime-deps
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]

# add runtime dependencies
RUN apk add --upgrade --no-cache \
bash \
python3 \
librdkafka \
librdkafka-dev

# Use jemalloc
RUN apk add --upgrade --no-cache jemalloc
ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2
Expand Down
Loading
Loading