Skip to content

Commit

Permalink
(#2400) Update paths for Docker build
Browse files Browse the repository at this point in the history
The strucutre of the code_drop folder has changed, and the docker
portion of the build needs to be updated to reflect this new
structure.
  • Loading branch information
gep13 committed May 3, 2022
1 parent a308fd6 commit 58f00b6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Running the build on Mono produces an artifact similar to Windows but may have m
### Installing on Other Platforms:

1. Get a copy of the source code and build.
1. Copy (or link) the contents of `./code_drop/chocolatey/console` to your preferred install directory. On Linux, the preferred directory is `/opt/chocolatey`
1. Copy (or link) the contents of `./code_drop/temp/_PublishedApps/choco` to your preferred install directory. On Linux, the preferred directory is `/opt/chocolatey`
1. Export the `ChocolateyInstall` environment variable, pointing to the install directory the build output was copied too.
1. Copy `./docker/choco_wrapper` to a directory on the `$PATH`, rename to `choco`, and if the install directory is something else than `/opt/chocolatey`, then edit it to point to the correct path.

Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ ARG buildscript="build.sh"
RUN if [ "$buildscript" = "build.official.sh" ]; then \
export CHOCOLATEY_OFFICIAL_KEY="/usr/local/src/choco/chocolatey.official.snk"; \
./$buildscript; \
cp docker/choco_official_wrapper code_drop/chocolatey/console/choco_wrapper; \
cp docker/choco_official_wrapper code_drop/temp/_PublishedApps/choco/choco_wrapper; \
else \
./$buildscript; \
cp docker/choco_wrapper code_drop/chocolatey/console/choco_wrapper; \
cp docker/choco_wrapper code_drop/temp/_PublishedApps/choco/choco_wrapper; \
fi;


Expand All @@ -36,7 +36,7 @@ LABEL org.opencontainers.image.base.name="index.docker.io/library/mono:${monover

ENV ChocolateyInstall /opt/chocolatey

COPY --from=build /usr/local/src/choco/code_drop/chocolatey/console /opt/chocolatey
COPY --from=build /usr/local/src/choco/code_drop/temp/_PublishedApps/choco /opt/chocolatey

RUN mkdir /opt/chocolatey/lib; \
cp /opt/chocolatey/choco_wrapper usr/local/bin/choco; \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LABEL org.opencontainers.image.description="Chocolatey Client running on .Net"
LABEL org.opencontainers.image.authors="https://chocolatey.org/support"
LABEL org.opencontainers.image.base.name="mcr.microsoft.com/windows/servercore:${tagversion}"

COPY ./code_drop/nuget C:/choco-nupkg
COPY ./code_drop/Packages/Chocolatey C:/choco-nupkg
COPY ./docker/Install-ChocolateyInContainer.ps1 C:/choco-nupkg/Install-ChocolateyInContainer.ps1
COPY ./src/chocolatey.resources/tools/ C:/choco-nupkg/tools/

Expand Down

0 comments on commit 58f00b6

Please sign in to comment.