Skip to content

Commit

Permalink
Merge pull request #15 from buttahtoast/dev-kkl
Browse files Browse the repository at this point in the history
use alpine as base image
  • Loading branch information
chifu1234 authored Dec 27, 2020
2 parents 00a450d + 16fb3bf commit 794c24d
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
FROM python:3-slim-buster

## Labels
LABEL maintainer="oliverbaehler@hotmail.com, kk@sudo-i.net"

## Environment Variables

### Tavern Configuration
ENV DEBUG false
ENV LOG_TO_FILE ""
ENV TEST_DIRECTORY "/tavern/"
ENV SCRIPT_DIRECTORY "/scripts"

### Paths
ENV PATH "~/.local/bin:${PATH}"
ENV PYTHONPATH "$SCRIPT_DIRECTORY"

### Base Configuration
ENV TAVERN_VERSION "1.11.1"
ENV TAVERN_USER_ID 1500
ENV TAVERN_GROUP_ID 1500
ENV SET_PERMISSIONS "true"

## Copy Entrypoint
COPY ./entrypoint.sh /

## Create Tavern User
RUN groupadd -g "${TAVERN_GROUP_ID}" tavern && useradd -s /bin/false -u ${TAVERN_USER_ID} -m -g tavern tavern \
&& mkdir -p ${TEST_DIRECTORY} ${SCRIPT_DIRECTORY} \
&& chown -R tavern:tavern ${TEST_DIRECTORY} ${SCRIPT_DIRECTORY} \
&& chmod +x /entrypoint.sh && chown tavern: /entrypoint.sh

## Install Tavern
USER tavern
RUN pip install --user tavern==${TAVERN_VERSION}

## Working Directory
WORKDIR "${TEST_DIRECTORY}"

## EntryPoint
ENTRYPOINT ["/entrypoint.sh"]
FROM python:3-alpine

## Labels
LABEL maintainer="oliverbaehler@hotmail.com, kk@sudo-i.net"

## Environment Variables

### Tavern Configuration
ENV DEBUG false
ENV LOG_TO_FILE ""
ENV TEST_DIRECTORY "/tavern/"
ENV SCRIPT_DIRECTORY "/scripts"

### Paths
ENV PATH "~/.local/bin:${PATH}"
ENV PYTHONPATH "$SCRIPT_DIRECTORY"

### Base Configuration
ENV TAVERN_VERSION "1.11.1"
ENV TAVERN_USER_ID 1500
ENV TAVERN_GROUP_ID 1500
ENV SET_PERMISSIONS "true"

## Create Tavern User
RUN addgroup -g "${TAVERN_GROUP_ID}" tavern && adduser -s /bin/false -u ${TAVERN_USER_ID} -D -G tavern tavern \
&& apk add --no-cache bash \
&& mkdir -p ${TEST_DIRECTORY} ${SCRIPT_DIRECTORY} \
&& chown -R tavern:tavern ${TEST_DIRECTORY} ${SCRIPT_DIRECTORY}

## Install Tavern
USER tavern
RUN pip install --user tavern==${TAVERN_VERSION}

## Copy Entrypoint
COPY ./entrypoint.sh /

## Working Directory
WORKDIR "${TEST_DIRECTORY}"

## EntryPoint
ENTRYPOINT ["/entrypoint.sh"]

0 comments on commit 794c24d

Please sign in to comment.