forked from sfc-gh-eraigosa/docker-traviscli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 824 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
ARG BASE_IMAGE=ruby:2.5.1-alpine
FROM $BASE_IMAGE
ARG TAG=1
ARG DOCKER_IMAGE=traviscli
ENV TAG=${TAG}
ENV DOCKER_IMAGE=${DOCKER_IMAGE}
RUN echo "Working on ${DOCKER_IMAGE}:${TAG}"
RUN echo "Installing git and travis cli" \
&& mkdir /workspace \
&& apk add --no-cache git \
&& apk add --no-cache bash \
&& apk add --no-cache build-base \
&& gem install travis \
&& apk del build-base
RUN echo "Setting up travis user" \
&& addgroup -S travis -g 1999 \
&& adduser -S -g travis -u 1999 travis
COPY entrypoint.sh /bin/entrypoint
COPY travis_profile.sh /etc/profile.d/travis_profile.sh
RUN chmod +x /bin/entrypoint
RUN /bin/entrypoint test
WORKDIR /workspace
USER travis
ENTRYPOINT ["/bin/entrypoint"]