Skip to content

Commit

Permalink
Build docker image from current build, not static version (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
larsar authored and groob committed May 5, 2018
1 parent bede230 commit 528937a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
16 changes: 5 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
FROM alpine:3.5
FROM alpine:3.6

ENV SCEP_VERSION=v1.0.0
RUN apk --no-cache add curl unzip && \
curl -L https://github.com/micromdm/scep/releases/download/${SCEP_VERSION}/scep.zip -o /scep.zip && \
unzip -p /scep.zip build/scepserver-linux-amd64 > /scep && \
rm /scep.zip && \
chmod a+x /scep && \
apk del curl unzip && \
echo 'b4af438c2cb0f9dda7a8253e49f6c9ec71492ebfe85c25334c16ed4a0499ebc4 scep' | sha256sum -c
COPY ./build/scepserver-linux-amd64 /usr/bin/scepserver
COPY ./build/scepclient-linux-amd64 /usr/bin/scepclient

EXPOSE 8080
VOLUME ["/depot"]
CMD ["/scep"]

ENTRYPOINT ["scepserver"]
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,13 @@ This most likely uses the `/certsrv/mscep` path instead. You will need to add th

# Docker
```
docker pull micromdm/scep
docker build -t micromdm/scep:latest .
# create CA
docker run -it --rm -v /path/to/ca/folder:/depot micromdm/scep ./scep ca -init
docker run -it --rm -v /path/to/ca/folder:/depot micromdm/scep:latest ca -init
# run
docker run -it --rm -v /path/to/ca/folder:/depot -p 8080:8080 micromdm/scep
docker run -it --rm -v /path/to/ca/folder:/depot -p 8080:8080 micromdm/scep:latest
```

# SCEP library
Expand Down

0 comments on commit 528937a

Please sign in to comment.