[go: up one dir, main page]

Skip to content

Commit

Permalink
Merge pull request #284 from kensonman/alpine
Browse files Browse the repository at this point in the history
Change the Docker base image from python:3-slim to python:3-alpine.
  • Loading branch information
huashengdun committed May 29, 2022
2 parents a9d959f + 309d912 commit 4aec063
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
FROM python:3.7-slim
FROM python:3-alpine

LABEL maintainer='<author>'
LABEL version='0.0.0-dev.0-build.0'

ADD . /code
WORKDIR /code
RUN \
groupadd -r webssh && \
useradd -r -s /bin/false -g webssh webssh && \
chown -R webssh:webssh /code && \
pip install -r requirements.txt
apk add --no-cache libc-dev libffi-dev gcc && \
pip install -r requirements.txt --no-cache-dir && \
apk del gcc libc-dev libffi-dev && \
addgroup webssh && \
adduser -Ss /bin/false -g webssh webssh && \
chown -R webssh:webssh /code

EXPOSE 8888/tcp
USER webssh
Expand Down

0 comments on commit 4aec063

Please sign in to comment.