Skip to content

Commit

Permalink
Merge pull request #10 from fanout/jkarneges/update-version
Browse files Browse the repository at this point in the history
update version
  • Loading branch information
jkarneges authored Jan 10, 2024
2 parents 6d44c93 + 5ccd510 commit 9579802
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 28 deletions.
38 changes: 22 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,36 @@
#

# Pull the base image
FROM ubuntu:22.04
MAINTAINER Justin Karneges <[email protected]>
FROM ubuntu:22.04 as build

# Add private APT repository
# Install deps
RUN \
apt-get update && \
apt-get install -y apt-transport-https software-properties-common && \
echo deb https://fanout.jfrog.io/artifactory/debian fanout-jammy main \
| tee /etc/apt/sources.list.d/fanout.list && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys \
7D0343148157C3DF
apt-get install -y git pkg-config make g++ rustc cargo libssl-dev qtbase5-dev libzmq3-dev libboost-dev

WORKDIR /build

ENV VERSION 1.38.0

ADD https://github.com/fastly/pushpin/releases/download/v${VERSION}/pushpin-${VERSION}.tar.bz2 .

RUN tar xvf pushpin-${VERSION}.tar.bz2 && mv pushpin-${VERSION} pushpin

ENV PUSHPIN_VERSION 1.37.0-1~jammy
WORKDIR /build/pushpin

RUN cargo fetch
RUN make RELEASE=1 PREFIX=/usr CONFIGDIR=/etc
RUN make RELEASE=1 PREFIX=/usr CONFIGDIR=/etc check
RUN make RELEASE=1 PREFIX=/usr CONFIGDIR=/etc INSTALL_ROOT=/build/out install

FROM ubuntu:22.04
MAINTAINER Justin Karneges <[email protected]>

# Install Pushpin
RUN \
apt-get update && \
apt-get install -y pushpin=$PUSHPIN_VERSION
apt-get install -y libqt5core5a libqt5network5 libzmq5

# Cleanup
RUN \
apt-get clean && \
rm -fr /var/lib/apt/lists/* && \
rm -fr /tmp/*
COPY --from=build /build/out/ /

# Add entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/
Expand Down
13 changes: 1 addition & 12 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
#!/bin/bash
set -e

# Configure Pushpin
if [ -w /usr/lib/pushpin/internal.conf ]; then
sed -i \
-e 's/zurl_out_specs=.*/zurl_out_specs=ipc:\/\/\{rundir\}\/pushpin-zurl-in/' \
-e 's/zurl_out_stream_specs=.*/zurl_out_stream_specs=ipc:\/\/\{rundir\}\/pushpin-zurl-in-stream/' \
-e 's/zurl_in_specs=.*/zurl_in_specs=ipc:\/\/\{rundir\}\/pushpin-zurl-out/' \
/usr/lib/pushpin/internal.conf
else
echo "docker-entrypoint.sh: unable to write to /usr/lib/pushpin/internal.conf, readonly"
fi

if [ -w /etc/pushpin/pushpin.conf ]; then
sed -i \
-e 's/services=.*/services=condure,zurl,pushpin-proxy,pushpin-handler/' \
-e 's/services=.*/services=condure,pushpin-proxy,pushpin-handler/' \
-e 's/push_in_spec=.*/push_in_spec=tcp:\/\/\*:5560/' \
-e 's/push_in_http_addr=.*/push_in_http_addr=0.0.0.0/' \
-e 's/push_in_sub_specs=.*/push_in_sub_spec=tcp:\/\/\*:5562/' \
Expand Down

0 comments on commit 9579802

Please sign in to comment.