Skip to content

Commit

Permalink
chore: fix docker image uploads, don't allow confusion over Dockerfil…
Browse files Browse the repository at this point in the history
…es (#1077)
  • Loading branch information
Andrew Kent authored Feb 16, 2021
1 parent dbcccd3 commit 31d691b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 84 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
password: ${{ secrets.GITHUBSAW }}
repository: galoisinc/saw
tags: "latest,${{ steps.outputs.outputs.saw-version }}"
dockerfile: saw/Dockerfile
add_git_labels: true
push: true
saw-remote-api:
Expand All @@ -39,6 +40,6 @@ jobs:
password: ${{ secrets.GITHUBSAW }}
repository: galoisinc/saw-remote-api
tags: "latest,${{ steps.outputs.outputs.saw-version }}"
file: Dockerfile-remote-api
dockerfile: saw-remote-api/Dockerfile
add_git_labels: true
push: true
3 changes: 2 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
password: ${{ secrets.GITHUBSAW }}
repository: galoisinc/saw
tags: "nightly"
dockerfile: saw/Dockerfile
add_git_labels: true
push: ${{ github.event_name == 'schedule' }}

Expand All @@ -57,7 +58,7 @@ jobs:
password: ${{ secrets.GITHUBSAW }}
repository: galoisinc/saw-remote-api
tags: "nightly"
file: Dockerfile-remote-api
dockerfile: saw-remote-api/Dockerfile
add_git_labels: true
push: ${{ github.event_name == 'schedule' }}

Expand Down
72 changes: 0 additions & 72 deletions Dockerfile-remote-api

This file was deleted.

17 changes: 7 additions & 10 deletions saw-remote-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,23 @@ RUN useradd -m saw
COPY --chown=saw:saw . /home/saw
USER saw
WORKDIR /home/saw
ARG CRYPTOLPATH="/cryptol/.cryptol"
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8
COPY cabal.GHC-8.8.4.config cabal.project.freeze
RUN mkdir -p rootfs/usr/local/bin
RUN cabal v2-update && \
cabal v2-build -j saw-remote-api:exe:saw-remote-api && \
cp $(cabal v2-exec which saw-remote-api) rootfs/usr/local/bin
RUN mkdir -p rootfs/"${CRYPTOLPATH}" \
&& cp -r deps/cryptol/lib/* rootfs/"${CRYPTOLPATH}"
RUN cabal v2-update && cabal v2-build -j exe:saw-remote-api
RUN mkdir -p /home/saw/rootfs/usr/local/bin
RUN cp $(cabal v2-exec which saw-remote-api) /home/saw/rootfs/usr/local/bin/saw-remote-api
WORKDIR /home/saw
USER root
RUN chown -R root:root /home/saw/rootfs

FROM debian:buster-slim
RUN apt-get update \
&& apt-get install -y libgmp10 libgomp1 libffi6 wget libncurses5 unzip \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN useradd -m saw && chown -R saw:saw /home/saw
&& apt-get install -y libgmp10 libgomp1 libffi6 wget libncurses5 unzip
COPY --from=build /home/saw/rootfs /
COPY --from=solvers /solvers/rootfs /
RUN useradd -m saw && chown -R saw:saw /home/saw
USER saw
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8
ENTRYPOINT ["/usr/local/bin/saw-remote-api"]
Expand Down
File renamed without changes.

0 comments on commit 31d691b

Please sign in to comment.