Skip to content

Commit 4aec063

Browse files
authored
Merge pull request #284 from kensonman/alpine
Change the Docker base image from python:3-slim to python:3-alpine.
2 parents a9d959f + 309d912 commit 4aec063

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git

Dockerfile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
FROM python:3.7-slim
1+
FROM python:3-alpine
2+
3+
LABEL maintainer='<author>'
4+
LABEL version='0.0.0-dev.0-build.0'
5+
26
ADD . /code
37
WORKDIR /code
48
RUN \
5-
groupadd -r webssh && \
6-
useradd -r -s /bin/false -g webssh webssh && \
7-
chown -R webssh:webssh /code && \
8-
pip install -r requirements.txt
9+
apk add --no-cache libc-dev libffi-dev gcc && \
10+
pip install -r requirements.txt --no-cache-dir && \
11+
apk del gcc libc-dev libffi-dev && \
12+
addgroup webssh && \
13+
adduser -Ss /bin/false -g webssh webssh && \
14+
chown -R webssh:webssh /code
915

1016
EXPOSE 8888/tcp
1117
USER webssh

0 commit comments

Comments
 (0)