-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathDockerfile
More file actions
70 lines (52 loc) · 1.76 KB
/
Dockerfile
File metadata and controls
70 lines (52 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#
# Pushpin Dockerfile
#
# https://github.com/fanout/docker-pushpin
#
# Pull the base image
FROM ubuntu:24.10 as build
# Install deps
RUN \
apt-get update && \
apt-get install -y bzip2 pkg-config make g++ rustc cargo libssl-dev qt6-base-dev libzmq3-dev libboost-dev
WORKDIR /build
ARG VERSION
ADD https://github.com/fastly/pushpin/releases/download/v${VERSION}/pushpin-${VERSION}.tar.bz2 .
RUN tar xf pushpin-${VERSION}.tar.bz2 && mv pushpin-${VERSION} pushpin
WORKDIR /build/pushpin
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:24.10
MAINTAINER Justin Karneges <jkarneges@fastly.com>
RUN \
apt-get update && \
apt-get install -y --no-install-recommends libqt6core6 libqt6network6 libzmq5 && \
apt-get -y autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/*
COPY --from=build /build/out/ /
# Add entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/
# Create a non-root user, group, directories and switch to that user.
RUN groupadd -r -g 1001 pushpin && \
useradd -r -u 1001 -g pushpin pushpin
RUN mkdir -p /var/run/pushpin && \
chown -R pushpin:pushpin /etc/pushpin /var/run/pushpin
# Using the user_id specifically here allows for less configuration in k8s
USER 1001
ENV LANG C.UTF-8
# Define default entrypoint and command
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["pushpin", "--merge-output"]
# Expose ports.
# - 7999: HTTP port to forward on to the app
# - 5560: ZMQ PULL for receiving messages
# - 5561: HTTP port for receiving messages and commands
# - 5562: ZMQ SUB for receiving messages
# - 5563: ZMQ REP for receiving commands
EXPOSE 7999
EXPOSE 5560
EXPOSE 5561
EXPOSE 5562
EXPOSE 5563