Skip to content

Commit

Permalink
Merge pull request tsl0922#4 from yugabyte/kcox/alpine
Browse files Browse the repository at this point in the history
Update alpine container to build.
  • Loading branch information
kevincox committed Jan 25, 2022
2 parents 3844e76 + 30ff7ad commit 34092ee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ WORKDIR build
RUN cmake ..
RUN make && make install

FROM ubuntu:20.04 as runner
FROM alpine as runner

ARG TARGETARCH
ARG DEBIAN_FRONTEND=noninteractive

COPY --from=builder /usr/local/bin/ttyd /usr/bin/ttyd
RUN apt-get update && apt-get install -y --no-install-recommends tini libjson-c-dev \
libwebsockets-dev && rm -rf /var/lib/apt/lists/*
RUN apk add --no-cache bash tini

EXPOSE 7681
WORKDIR /root
Expand Down
16 changes: 13 additions & 3 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
FROM alpine
FROM ubuntu:20.04 as builder

ARG TARGETARCH
COPY ./dist/${TARGETARCH}/ttyd /usr/bin/ttyd
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y build-essential cmake git libjson-c-dev libwebsockets-dev
COPY . .
RUN mkdir build
WORKDIR build
RUN cmake ..
RUN make && make install

FROM alpine as runner

COPY --from=builder /usr/local/bin/ttyd /usr/bin/ttyd
RUN apk add --no-cache bash tini

EXPOSE 7681
Expand Down

0 comments on commit 34092ee

Please sign in to comment.