File tree Expand file tree Collapse file tree 2 files changed +75
-7
lines changed Expand file tree Collapse file tree 2 files changed +75
-7
lines changed Original file line number Diff line number Diff line change 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 alpine:3.14
16+ # Compile
17+ FROM rust:1.63-alpine AS compiler
18+
19+ RUN apk add -q --update-cache --no-cache build-base openssl-dev
1720
18- RUN apk update --quiet \
19- && apk add -q --no-cache libgcc curl
20-
2121# Create appuser
2222ENV USER=parseable
2323ENV UID=10001
@@ -31,14 +31,36 @@ RUN adduser \
3131 --uid "${UID}" \
3232 "${USER}"
3333
34+ WORKDIR /parseable
35+
36+ COPY . .
37+
38+ RUN set -eux; \
39+ apkArch="$(apk --print-arch)" ; \
40+ if [ "$apkArch" = "aarch64" ]; then \
41+ export JEMALLOC_SYS_WITH_LG_PAGE=16; \
42+ fi && \
43+ cargo build --release
44+
45+ # Run
46+ FROM alpine:3.14
47+
48+ RUN apk update --quiet \
49+ && apk add -q --no-cache libgcc curl
50+
51+ # add parseable to the `/bin` so you can run it from anywhere and it's easy
52+ # to find.
53+ COPY --from=compiler /etc/passwd /etc/passwd
54+ COPY --from=compiler /etc/group /etc/group
55+
3456# This directory should hold all the data related to parseable so we're going
3557# to move our PWD in there.
3658WORKDIR /parseable
3759
38- ADD https://github.com/parseablehq/ parseable/releases/latest/download/parseable_linux_x86_64 /bin/parseable
60+ COPY --from=compiler / parseable/target/release/parseable /bin/parseable
3961
40- USER parseable:parseable
62+ USER parseable:parseable
4163
4264EXPOSE 8000/tcp
4365
44- CMD ["/bin/parseable" ]
66+ CMD ["/bin/parseable" ]
Original file line number Diff line number Diff line change 1+ # Copyright (C) 2022 Parseable, Inc.
2+ #
3+ # This program is free software: you can redistribute it and/or modify
4+ # it under the terms of the GNU Affero General Public License as
5+ # published by the Free Software Foundation, either version 3 of the
6+ # License, or (at your option) any later version.
7+ #
8+ # This program is distributed in the hope that it will be useful,
9+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ # GNU Affero General Public License for more details.
12+ #
13+ # You should have received a copy of the GNU Affero General Public License
14+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
16+ FROM alpine:3.14
17+
18+ RUN apk update --quiet \
19+ && apk add -q --no-cache libgcc curl
20+
21+ # Create appuser
22+ ENV USER=parseable
23+ ENV UID=10001
24+
25+ RUN adduser \
26+ --disabled-password \
27+ --gecos "" \
28+ --home "/nonexistent" \
29+ --shell "/sbin/nologin" \
30+ --no-create-home \
31+ --uid "${UID}" \
32+ "${USER}"
33+
34+ # This directory should hold all the data related to parseable so we're going
35+ # to move our PWD in there.
36+ WORKDIR /parseable
37+
38+ RUN \
39+ wget https://github.com/parseablehq/parseable/releases/latest/download/parseable_linux_x86_64 -O /bin/parseable && \
40+ chmod +x /bin/parseable
41+
42+ USER parseable:parseable
43+
44+ EXPOSE 8000/tcp
45+
46+ CMD ["/bin/parseable"]
You can’t perform that action at this time.
0 commit comments