Skip to content

Instantly share code, notes, and snippets.

@skonik
Last active September 11, 2019 14:59
Show Gist options
  • Select an option

  • Save skonik/a27fc05fb41e8dd9031cb4cfe710a957 to your computer and use it in GitHub Desktop.

Select an option

Save skonik/a27fc05fb41e8dd9031cb4cfe710a957 to your computer and use it in GitHub Desktop.

Revisions

  1. skonik revised this gist Sep 11, 2019. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,10 @@
    FROM alpine:3.10

    # Install runtime libs
    RUN apk add python3=3.6.8-r2 \
    libpq \
    libjpeg-turbo

    # Enable non buffered output into tty
    ENV PYTHONUNBUFFERED 1
    # Set default lang
    @@ -21,3 +26,6 @@ RUN apk --update --virtual build-deps \ # update index and use virtual d
    && rm -rf /root/.cache/* # remove pip and pipenv cache

    COPY . /app


    ENTRYPOINT ["sh", "docker-entrypoint.sh"]
  2. skonik revised this gist Aug 12, 2019. 1 changed file with 12 additions and 10 deletions.
    22 changes: 12 additions & 10 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -9,13 +9,15 @@ WORKDIR /app/

    COPY Pipfile Pipfile.lock /app/

    RUN apk --update --virtual build-deps \
    add py3-pip \ # pip3
    python3-dev=3.6.8-r2 \ # python3.6 with .c headers
    build-base \ # gcc + musl-dev(lib-c implementation)
    postgresql-dev \ # postgres lib
    jpeg-dev zlib-dev \ # pillow deps
    && pip3 install pipenv \
    && pipenv install --system --deploy \ # install into system
    && apk del build-deps \ # delete deps (gcc, libc, etc)
    && rm -rf /root/.cache/* # remove pip and pipenv cache
    RUN apk --update --virtual build-deps \ # update index and use virtual deps
    add py3-pip \ # pip3
    python3-dev=3.6.8-r2 \ # python3.6 with .c headers
    build-base \ # gcc + musl-dev(lib-c implementation)
    postgresql-dev \ # postgres lib
    jpeg-dev zlib-dev \ # pillow deps
    && pip3 install pipenv \
    && pipenv install --system --deploy \ # install into system
    && apk del build-deps \ # delete virtual deps (remove gcc, libc, etc)
    && rm -rf /root/.cache/* # remove pip and pipenv cache

    COPY . /app
  3. skonik created this gist Aug 12, 2019.
    21 changes: 21 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    FROM alpine:3.10

    # Enable non buffered output into tty
    ENV PYTHONUNBUFFERED 1
    # Set default lang
    ENV LANG C.UTF-8

    WORKDIR /app/

    COPY Pipfile Pipfile.lock /app/

    RUN apk --update --virtual build-deps \
    add py3-pip \ # pip3
    python3-dev=3.6.8-r2 \ # python3.6 with .c headers
    build-base \ # gcc + musl-dev(lib-c implementation)
    postgresql-dev \ # postgres lib
    jpeg-dev zlib-dev \ # pillow deps
    && pip3 install pipenv \
    && pipenv install --system --deploy \ # install into system
    && apk del build-deps \ # delete deps (gcc, libc, etc)
    && rm -rf /root/.cache/* # remove pip and pipenv cache