use alpine as the docker distribution

This commit is contained in:
Benjamin Sergeant 2020-03-27 17:38:35 -07:00
parent 771ebb2a4c
commit 68c64f3f69
2 changed files with 4 additions and 6 deletions

View File

@ -1 +1 @@
docker/Dockerfile.centos
docker/Dockerfile.alpine

View File

@ -1,6 +1,6 @@
FROM alpine:3.11 as build
RUN apk add --no-cache gcc g++ musl-dev linux-headers cmake openssl-dev
RUN apk add --no-cache gcc g++ musl-dev linux-headers cmake mbedtls-dev
RUN apk add --no-cache make
RUN apk add --no-cache zlib-dev
@ -14,14 +14,12 @@ COPY --chown=app:app . /opt
WORKDIR /opt
USER app
RUN [ "make", "ws_install" ]
RUN [ "make", "ws_mbedtls_install" ]
RUN [ "rm", "-rf", "build" ]
FROM alpine:3.11 as runtime
RUN apk add --no-cache libstdc++
RUN apk add --no-cache strace
RUN apk add --no-cache gdb
RUN apk add --no-cache libstdc++ mbedtls
RUN addgroup -S app && adduser -S -G app app
COPY --chown=app:app --from=build /usr/local/bin/ws /usr/local/bin/ws