Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 7 additions & 29 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# Compile
FROM rust:1.63-alpine AS compiler

RUN apk add -q --update-cache --no-cache build-base openssl-dev
FROM alpine:3.14

RUN apk update --quiet \
&& apk add -q --no-cache libgcc curl

# Create appuser
ENV USER=parseable
ENV UID=10001
Expand All @@ -31,36 +31,14 @@ RUN adduser \
--uid "${UID}" \
"${USER}"

WORKDIR /parseable

COPY . .

RUN set -eux; \
apkArch="$(apk --print-arch)"; \
if [ "$apkArch" = "aarch64" ]; then \
export JEMALLOC_SYS_WITH_LG_PAGE=16; \
fi && \
cargo build --release

# Run
FROM alpine:3.14

RUN apk update --quiet \
&& apk add -q --no-cache libgcc curl

# add parseable to the `/bin` so you can run it from anywhere and it's easy
# to find.
COPY --from=compiler /etc/passwd /etc/passwd
COPY --from=compiler /etc/group /etc/group

# This directory should hold all the data related to parseable so we're going
# to move our PWD in there.
WORKDIR /parseable

COPY --from=compiler /parseable/target/release/parseable /bin/parseable
ADD https://github.com/parseablehq/parseable/releases/latest/download/parseable_linux_x86_64 /bin/parseable

USER parseable:parseable
USER parseable:parseable

EXPOSE 8000/tcp

CMD ["/bin/parseable"]
CMD ["/bin/parseable"]