Skip to content

Commit

Permalink
Update Docker image
Browse files Browse the repository at this point in the history
Signed-off-by: Florentin Dubois <florentin.dubois@clever-cloud.com>
  • Loading branch information
FlorentinDUBOIS committed May 23, 2023
1 parent 458bb5a commit d088468
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 234 deletions.
9 changes: 0 additions & 9 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
.git
.gitignore
.travis.yml
target
LICENSE
README.md
doc
CONTRIBUTING.md
bin/command_folder
os-build
!os-build/docker
22 changes: 13 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG ALPINE_VERSION=edge

FROM alpine:$ALPINE_VERSION as builder

RUN apk update && apk add --no-cache --virtual .build-dependencies \
Expand All @@ -7,15 +8,18 @@ RUN apk update && apk add --no-cache --virtual .build-dependencies \
file \
libgcc \
musl-dev \
protobuf protobuf-dev \
protobuf \
protobuf-dev \
rust
RUN apk add --no-cache openssl-dev \
llvm-libunwind \

RUN apk add --no-cache llvm-libunwind \
pkgconfig

COPY . /source/
WORKDIR /source/bin
RUN cargo build --release --locked
COPY . /usr/src/sozu
WORKDIR /usr/src/sozu

RUN cargo vendor --locked
RUN cargo build --release --frozen

FROM alpine:$ALPINE_VERSION as bin

Expand All @@ -25,15 +29,15 @@ EXPOSE 443
VOLUME /etc/sozu
VOLUME /run/sozu

RUN mkdir /var/lib/sozu
RUN mkdir -p /var/lib/sozu

RUN apk update && apk add --no-cache \
llvm-libunwind \
libgcc \
ca-certificates

COPY --from=builder /source/target/release/sozu /usr/local/bin/sozu
COPY os-build/docker/config.toml /etc/sozu/config.toml
COPY --from=builder /usr/src/sozu/target/release/sozu /usr/local/bin/sozu
COPY os-build/config.toml /etc/sozu/config.toml
COPY lib/assets/404.html /etc/sozu/html/404.html
COPY lib/assets/503.html /etc/sozu/html/503.html

Expand Down
216 changes: 0 additions & 216 deletions os-build/docker/config.toml

This file was deleted.

0 comments on commit d088468

Please sign in to comment.