-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathDockerfile.localbin
38 lines (29 loc) · 984 Bytes
/
Dockerfile.localbin
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
ARG GO_VERSION=alpine
FROM golang:${GO_VERSION}
RUN apk update \
&& apk add --no-cache \
linux-headers \
gcc \
libtool \
openssl-dev \
libffi \
tini \
git \
'su-exec>=0.2' \
&& apk add --no-cache --virtual .build_deps build-base libffi-dev
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
RUN addgroup -g 502 -S bloxroute \
&& adduser -u 502 -S -G bloxroute bloxroute \
&& mkdir -p /app/bloxroute/logs \
&& mkdir -p /app/bloxroute/datadir \
&& chown -R bloxroute:bloxroute /app/bloxroute
# Move to working directory
WORKDIR /app/bloxroute
RUN chmod +s /bin/ping
RUN chmod +s /bin/busybox
COPY ./bin/bxcli /app/bloxroute/bin/bxcli
COPY ./bin/gateway /app/bloxroute/bin/gateway
COPY docker-entrypoint.sh /usr/local/bin/
ENV PATH="/app/bloxroute/bin:${PATH}"
EXPOSE 1801 5001
ENTRYPOINT ["/sbin/tini", "--", "/bin/sh", "/usr/local/bin/docker-entrypoint.sh"]